Skip to content
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

[WIP] Projection Push Down Join, Projection Remove, and Projection Agg Transpose Rules #182

Draft
wants to merge 76 commits into
base: main
Choose a base branch
from

Conversation

Sweetsuro
Copy link
Contributor

@Sweetsuro Sweetsuro commented May 2, 2024

DO NOT MERGE. This PR implements the remainder of the projection transpose series of rules.

List of Necessary Fixes Prior to Merge

  • Projection Push Down Join Rule can still apply on the top-level proj -> join, even if it's just generating redundant projection nodes beneath the join node. Need to find a way to avoid applying the rule in cascade's core logic (and in heuristic code path).
  • Join enumeration is not possible with cyclic memo nodes. Need to implement a better join enumeration algorithm that is not brute forcing through everything in the memo table.
  • Need a way to match on Scan nodes. Currently, ProjectRemoveRule is only possible in the Heuristic Optimizer pass because of this.
  • Projection Agg Transpose Rule remains unimplemented.

Projection Push Down Join Rule

  • This rule pushes a projection past a join node. It may still have a top most projection node, and in most cases creates a projection node above the left join child and a projection node above the right join child.
  • This rule is commented out but intended to be a heuristic wrapper rule

Projection Remove Rule

  • This rule matches on a projection node followed by a scan node.
  • It is added in the preliminary heuristic pass

Testing

Unit tests using the dummy heuristic optimizer were implemented.

Sweetsuro and others added 30 commits March 29, 2024 00:10
Signed-off-by: AveryQi115 <[email protected]>
Signed-off-by: AveryQi115 <[email protected]>
Signed-off-by: AveryQi115 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants