Skip to content

Commit

Permalink
changefeedccl: skip default collated string locale in changefeed avro
Browse files Browse the repository at this point in the history
In TestAvroSchema, we randomly pick column types which may be collated
strings. The test panics if the "default" locale is selected for a
colated string, so this PR skips that type.

Epic: none
Informs: #140632

Release note: none
  • Loading branch information
rharding6373 committed Feb 6, 2025
1 parent 0e31e26 commit 4cf44f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/ccl/changefeedccl/avro/avro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,11 @@ func TestAvroSchema(t *testing.T) {
// "C" and "POSIX" locales are not allowed for collated string
// columns in CRDB (see collatedstring logic tests),
// so we don't expect these types to be emitted by changefeeds.
// TODO(#140632): Reenable "default" locale.
randCollationTag := collationTags[rand.Intn(len(collationTags))]
for randCollationTag == collatedstring.CCollationTag ||
randCollationTag == collatedstring.PosixCollationTag {
randCollationTag == collatedstring.PosixCollationTag ||
randCollationTag == collatedstring.DefaultCollationTag {
randCollationTag = collationTags[rand.Intn(len(collationTags))]
}
collatedType := types.MakeCollatedString(typ, randCollationTag)
Expand Down

0 comments on commit 4cf44f2

Please sign in to comment.