Skip to content

Commit bdefcf7

Browse files
craig[bot]yuzefovich
andcommitted
Merge #152560
152560: ttljob: use COLLATED STRING in TestRowLevelTTLJobRandomEntries r=yuzefovich a=yuzefovich In a recently merged change where we prohibited usage of CITEXT type in the mixed-version state in `TestRowLevelTTLJobRandomEntries`, I made the mistake of also excluding non-CITEXT COLLATED STRING type. This is now fixed. Additionally, fix a typo in the comment from another change. Epic: None Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
2 parents f00ff8d + aa38214 commit bdefcf7

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

pkg/sql/delete_range.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ func (d *deleteRangeNode) processResults(
204204
// Make a copy of curRowPrefix to avoid referencing the memory from
205205
// the now-old BatchRequest.
206206
//
207-
// When auto-commit is enabled, we expect to see any resume spans,
208-
// so we won't need to access d.curRowPrefix later.
207+
// When auto-commit is enabled, we expect to not see any resume
208+
// spans, so we won't need to access d.curRowPrefix later.
209209
curRowPrefix := make([]byte, len(d.curRowPrefix))
210210
copy(curRowPrefix, d.curRowPrefix)
211211
d.curRowPrefix = curRowPrefix

pkg/sql/ttl/ttljob/ttljob_test.go

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -692,29 +692,33 @@ func TestRowLevelTTLJobRandomEntries(t *testing.T) {
692692
if !colinfo.ColumnTypeIsIndexable(typ) {
693693
continue
694694
}
695-
switch typ.Family() {
696-
case types.DateFamily:
697-
// TODO(#76419): DateFamily has a broken `-infinity` case.
698-
case types.JsonFamily:
699-
// TODO(#99432): JsonFamily has broken cases. This is because the
700-
// test is wrapping JSON objects in multiple single quotes which
701-
// causes parsing errors.
702-
case types.CollatedStringFamily:
703-
if typ.Oid() != oidext.T_citext && typ.Oid() != oidext.T__citext {
704-
if int(clusterversion.MinSupported) >= int(clusterversion.V25_3) {
695+
ok := func() bool {
696+
switch typ.Family() {
697+
case types.DateFamily:
698+
// TODO(#76419): DateFamily has a broken `-infinity` case.
699+
return false
700+
case types.JsonFamily:
701+
// TODO(#99432): JsonFamily has broken cases. This is because the
702+
// test is wrapping JSON objects in multiple single quotes which
703+
// causes parsing errors.
704+
return false
705+
case types.CollatedStringFamily:
706+
if typ.Oid() == oidext.T_citext || typ.Oid() == oidext.T__citext {
705707
// CITEXT is only supported in 25.3+, so if we happen to run
706708
// the test in the mixed version variant, we can't use the
707709
// type.
708-
indexableTyps = append(indexableTyps, typ)
710+
return int(clusterversion.MinSupported) >= int(clusterversion.V25_3)
709711
}
710-
}
711-
case types.LTreeFamily:
712-
if int(clusterversion.MinSupported) >= int(clusterversion.V25_4) {
712+
return true
713+
case types.LTreeFamily:
713714
// LTREE is only supported in 25.4+, so if we happen to run the
714715
// test in the mixed version variant, we can't use the type.
715-
indexableTyps = append(indexableTyps, typ)
716+
return int(clusterversion.MinSupported) >= int(clusterversion.V25_4)
717+
default:
718+
return true
716719
}
717-
default:
720+
}()
721+
if ok {
718722
indexableTyps = append(indexableTyps, typ)
719723
}
720724
}

0 commit comments

Comments
 (0)