-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: use IndexFetchSpec for zigzag join #78295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, 5 of 5 files at r2, 27 of 27 files at r3, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @RaduBerinde)
pkg/sql/rowexec/zigzagjoiner_test.go, line 232 at r3 (raw file):
}, { FetchSpec: makeFetchSpec(t, empty, "d", "a,b,d"),
This should be highRangeDesc
.
pkg/sql/rowexec/zigzagjoiner_test.go, line 248 at r3 (raw file):
Sides: []execinfrapb.ZigzagJoinerSpec_Side{ { FetchSpec: makeFetchSpec(t, empty, "c", "a,b,c"),
Here the order of empty
and highRangeDesc
is switched.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, 5 of 5 files at r2, 27 of 27 files at r3, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @RaduBerinde)
The zig-zag joiner code still uses `Bytes` instead of `EncodedKey` for the encoded key. This works because the fixed values are encoded using VALUE encoding, and the value encodings are the same for `DBytes` and `DEncodedKey`. This commit updates the zigzag joiner to use the correct `EncodedKey` type. The code no longer needs to special case inverted indexes - with the addition of support for `EncodedKey` in `keyside.Encode`, the general code path can now be used. Release note: None
This change cleans up the zig-zag joiner spec: we move the per-side information into a Side sub-message and use a list of Sides instead of many parallel lists. Other misc cleanup in the zigzag joiner code is included. Release note: None
This commit changes the zigzag joiner to use IndexFetchSpec for the two sides instead of table and index descriptors. The internal schema of the zigzag joiner is changed to match the fetched columns, simplifying the execution code. This change necessitates fixes on the planning side - we weren't determining the necessary scan columns correctly (this wasn't a problem when the internal schema had all table columns and we were relying on the execution layer to figure out what is needed). Release note: None
772e76c
to
d8710a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TFTRs!
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @yuzefovich)
pkg/sql/rowexec/zigzagjoiner_test.go, line 232 at r3 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
This should be
highRangeDesc
.
Done.
pkg/sql/rowexec/zigzagjoiner_test.go, line 248 at r3 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
Here the order of
empty
andhighRangeDesc
is switched.
Done.
bors r+ |
Build succeeded: |
rowexec: follow-up cleanup for EncodedKey in zigzagjoiner
The zig-zag joiner code still uses
Bytes
instead ofEncodedKey
forthe encoded key. This works because the fixed values are encoded using
VALUE encoding, and the value encodings are the same for
DBytes
andDEncodedKey
.This commit updates the zigzag joiner to use the correct
EncodedKey
type. The code no longer needs to special case inverted indexes -
with the addition of support for
EncodedKey
inkeyside.Encode
, thegeneral code path can now be used.
Release note: None
sql: clean up ZigZagJoinerSpec
This change cleans up the zig-zag joiner spec: we move the per-side
information into a Side sub-message and use a list of Sides instead of
many parallel lists. Other misc cleanup in the zigzag joiner code is
included.
Release note: None
sql: use IndexFetchSpec for zigzag join
This commit changes the zigzag joiner to use IndexFetchSpec for the
two sides instead of table and index descriptors. The internal schema
of the zigzag joiner is changed to match the fetched columns,
simplifying the execution code.
This change necessitates fixes on the planning side - we weren't
determining the necessary scan columns correctly (this wasn't a
problem when the internal schema had all table columns and we were
relying on the execution layer to figure out what is needed).
Release note: None