colexec: allow unneeded index columns to be skipped in cfetcher#43024
colexec: allow unneeded index columns to be skipped in cfetcher#43024craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
8d1805e to
0a8b5fc
Compare
ef2a0c1 to
469ccb0
Compare
|
This depends on #43002 after the recent push. |
jordanlewis
left a comment
There was a problem hiding this comment.
This needs some tests that prove that what you say is being added is actually true. Like, make a query that doesn't read all index columns and have some unsupported types in there.
It looks like it's failing CI due to an unsupported type thing?
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)
pkg/sql/colexec/cfetcher.go
Outdated
| // One value per column that is part of the key; each value is a column | ||
| // index (into cols); -1 if we don't need the value for that column. | ||
| indexColOrdinals []int | ||
| // allIndexColOrdinals is the same as allIndexColOrdinals but |
There was a problem hiding this comment.
This sentence references the same field twice
| indexColOrdinals []int | ||
| // allIndexColOrdinals is the same as allIndexColOrdinals but | ||
| // does not contain any -1's. It is meant to be used only in logging. | ||
| allIndexColOrdinals []int |
There was a problem hiding this comment.
It seems like we use it for more than just logging, no?
There was a problem hiding this comment.
we use it to just fill in all of the index columns when printing k/vs to the trace, as opposed to the needed set when tracekv is off
It seems like all indexed columns were being marked as needed in the cfetcher initialization steps, whether they were actually in neededCols or not. This meant that unneeded columns weren't actually getting skipped. Release note: None
469ccb0 to
a8bbae1
Compare
|
RFAL |
|
I think this PR fixes #43153, right? |
|
I think so? I don't know how to find the schema of the tables in the queries to try it out though... |
|
You need to go to |
|
Yes i see that, but it doesn't show me the initial set of defined tables available to SQLsmith -- the logs just start with the queries it is running. @mjibson where should I look? |
|
The config is called "empty", so there are no initial tables in that case. If there were, they would also be included in the |
|
Alright, I've confirmed that #43395 is fixed by this commit. |
jordanlewis
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)
|
bors r+ |
43024: colexec: allow unneeded index columns to be skipped in cfetcher r=rohany a=rohany It seems like all indexed columns were being marked as needed in the cfetcher initialization steps, whether they were actually in neededCols or not. This meant that unneeded columns weren't actually getting skipped. Release note: None Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu>
Build succeeded |
|
We should backport this commit and unrevert the revert (#43072), right guys? cc @asubiotto |
|
This has to be backported too #43002 (and first) I think |
|
Yes, i think that is correct. |
It seems like all indexed columns were being marked as needed in
the cfetcher initialization steps, whether they were actually
in neededCols or not. This meant that unneeded columns weren't
actually getting skipped.
Release note: None