-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
colfetcher: find needed columns upfront
Previously, the two users of the `cFetcher` (`ColBatchScan` and `ColIndexJoin`) had different ways of figuring out which columns are actually needed to be fetched (that information is needed to not decode parts of the KV pairs unnecessarily). In one case we explicitly propagated the information through the spec, and in another we did some pre-processing to find the information. This overall was more complicated than necessary (because we had complex code path for pruning "unaccessible" columns from the secondary index while keeping track of the ordinal mapping) as well as suboptimal (in some cases `TableReaderSpec.NeededColumns` contained ordinals of the columns that weren't actually needed by the post-processing stage), so this commit unifies both ways into one addressing both of these shortcomings. Now, in order to find the set of needed columns, we examine the post-processing spec all the time, but we do it in an efficient manner: - we make sure to deserialize render expressions early - we use a `tree.Visitor` rather than a heavy-weight `ExprHelper`. As a result, we can remove `TableReaderSpec.NeededColumns` field as well as not decode some columns in a handful of cases. Release note: None
- Loading branch information
1 parent
7c72806
commit 2c23b80
Showing
18 changed files
with
144 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.