Skip to content

Commit 2bee861

Browse files
committed
keyside: temporarily don't return assertion error for LTREE
We merged new LTREE datum type only with value encoding, yet this type can be key-encodable (but that is not implemented). In such case, in test builds we return an assertion error for missing key encoding, and many of our tests fail if they see an assertion error. To silence this expected failure mode we add an exception for LTREE to result in a regular error for now, which I think should cover most test failures we've seen. Release note: None
1 parent 8fcfd5a commit 2bee861

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/sql/rowenc/keyside/encode.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ func Encode(b []byte, val tree.Datum, dir encoding.Direction) ([]byte, error) {
183183
return encodeJSONKey(b, t, dir)
184184
}
185185
if buildutil.CrdbTestBuild {
186+
if _, isLTree := val.(*tree.DLTree); isLTree {
187+
// TODO(paulniziolek): remove this exception once key encoding is
188+
// added.
189+
return nil, errors.Newf("LTREE key encoding is not implemented yet")
190+
}
186191
return nil, errors.AssertionFailedf("unable to encode table key: %T", val)
187192
}
188193
return nil, errors.Errorf("unable to encode table key: %T", val)

0 commit comments

Comments
 (0)