Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

[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 <averyqi115@gmail.com>
Signed-off-by: AveryQi115 <averyqi115@gmail.com>
Signed-off-by: AveryQi115 <averyqi115@gmail.com>
Signed-off-by: AveryQi115 <averyqi115@gmail.com>
Signed-off-by: AveryQi115 <averyqi115@gmail.com>
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants