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

feat: projection merge and projection filter transpose rule #162

Merged
merged 72 commits into from
May 1, 2024

Conversation

Sweetsuro
Copy link
Contributor

@Sweetsuro Sweetsuro commented Apr 17, 2024

This PR implements a part of the projection transpose series of rules. It also includes a fair amount of refactoring.

Projection Merge Rule

  • This rule matches on two projection nodes and combines the two nodes into one.
  • It is added to the heuristic optimizer pass before the cascades optimizer. In the future, it should also be added to a pass after the cascades optimizer.

Projection Filter Transpose Rule

  • This rule matches pushes a projection node passed a filter node. If the filter node contains columns that are not in this projection node, the top most projection node is also kept.
  • It is added as a cascades rule.

Refactoring

Relevant functions for projection transpose rules can be found in project_transpose_common.rs. Rules are implemented in separate files as a part of the projection_transpose module rather than in all one file. Similarly, FilterProjectTransposeRule and ProjectionPullUpJoin were moved into this module.

Testing

Unit tests using the dummy heuristic optimizer were implemented.

@Sweetsuro Sweetsuro marked this pull request as ready for review April 17, 2024 20:32
Copy link
Member

@skyzh skyzh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, good work :)

Copy link
Member

@jurplel jurplel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice work on testing. Sorry for the delay.

@Sweetsuro Sweetsuro merged commit 9ef6339 into main May 1, 2024
1 check passed
@Sweetsuro Sweetsuro deleted the sweetsuro/project-remove branch May 1, 2024 04:07
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.

4 participants