-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEAT] Add all projection optimization rules to new query planner. (#…
…1288) This PR includes all the rules we currently have for optimizing Projections, but is organized slightly differently. When run on a Projection node, ProjectionPushdown will: 1. Delete the node if it is unnecessary; or else 2. Trim columns in upstream Projections, Aggregates, and Source nodes; or else 3. Create new projections behind other upstream nodes if possible. Finally, if a change has been made, this rule recurses on the new node immediately. This ensures that old projection nodes that have become newly redundant are pruned immediately, while still having a clean separation of logic such that none of the logic in {creating, deleting, modifying} nodes have to worry about the other. ---- There is also a rule for Aggregate (since it also projects columns from its parent). If the Aggregate implicitly drops columns from its parent, a Projection is created upstream to make the drop explicit. This rule will only ever fire once, since projection pushdown monotonically decreases the number of columns across the plan. Then, the newly created projection will be optimized just like any other projection. ---- This PR also updates the tabular scan shim to include the ability to pass in specific columns to read. We also rename schemas in source nodes and associated structs to make it explicit whether the schema is of the source or of the intended plan output. --------- Co-authored-by: Xiayue Charles Lin <[email protected]> Co-authored-by: Clark Zinzow <[email protected]>
- Loading branch information
1 parent
afc874b
commit 337f0fc
Showing
20 changed files
with
653 additions
and
77 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
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.