opt: fix inverted key column type in testcat#82547
opt: fix inverted key column type in testcat#82547craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
|
a discussion (no related file): |
678e325 to
aa5de04
Compare
Thanks! Should be fixed now.
Yes. This PR includes that change: https://github.com/cockroachdb/cockroach/pull/82547/files#diff-f5b6d3abeaf55ecb48cf9aa29ab0e311a1c4a4ede69bce28913d5b45449f6b6aR1109
I believe we are using EncodedKey because |
|
Ohh true. I see now! |
michae2
left a comment
There was a problem hiding this comment.
Reviewed 10 of 10 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @mgartner and @wenyihu6)
pkg/sql/opt_catalog.go
Outdated
| // Add an inverted column that refers to the inverted index key. | ||
| invertedCol, invertedColOrd := newColumn() | ||
|
|
||
| // All inverted columns have type bytes. |
There was a problem hiding this comment.
Should we change this comment to // All inverted columns have type EncodedKey.?
|
This is probably unrelated to this pr change. But when I was reviewing the code for inverted column type, I was confused about the logic here. Why should the first column type be int? |
I think this is something called the cellid though I don't really know the significance. I'm guessing that normally the encoding of the inverted index key is opaque to the optimizer, but in this case we wanted the optimizer to know about the cellid for some reason. |
There was a problem hiding this comment.
Reviewed 2 of 10 files at r1.
Reviewable status:complete! 2 of 0 LGTMs obtained (waiting on @mgartner)
Previously, inverted key columns in the test catalog were incorrectly given the type of their source column. Now they have the correct type, `types.EncodedKey`. Release note: None
aa5de04 to
ec8e63c
Compare
Thanks for pointing this out. I'm not sure about the |
I've addressed the problems I could see in this PR: #82632 |
|
TFTRs! bors r+ |
|
Build succeeded: |
Previously, inverted key columns in the test catalog were incorrectly
given the type of their source column. Now they have the correct type,
types.EncodedKey.Release note: None