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: lateral function call to linear data flow #536

Merged
merged 35 commits into from
Dec 25, 2022
Merged

Conversation

gaurav274
Copy link
Member

  • A simpler and easier-to-understand pipeline
  • Reduce need for special case handling in the execution engine
  • Simpler implementation for supporting reuse and ray due to the lack of branching.

image

@gaurav274 gaurav274 changed the title feat: Lateral function call to linear data flow feat: lateral function call to linear data flow Dec 16, 2022
@gaurav274 gaurav274 changed the base branch from master to renaming December 17, 2022 00:23
Base automatically changed from renaming to master December 17, 2022 02:36
def apply(self, before: LogicalJoin, context: OptimizerContext):
# LogicalJoin(Lateral) LogicalApplyAndMerge
# / \ -> |
# A LogicalFunctionScan A
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we directly create the new operator (LogicalApplyAndMerge --- A) from the statement? I can see the current implementation requires few code modification. Does this transformation have any other benefits?

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered doing it. However, I feel that will require adding a lot more core. Via rules, it is easier to understand the changes, and we can fallback to lateral join whenever needed. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I can not think of any issues right now. We need to make sure that this rule applies first, because I assume all later rewrite rules (such as UDF reuse) will base on the new linear design.

eva/optimizer/rules/rules.py Show resolved Hide resolved
@gaurav274 gaurav274 merged commit 99df864 into master Dec 25, 2022
@gaurav274 gaurav274 deleted the lateral_rewrite branch December 25, 2022 03:30
@jarulraj jarulraj mentioned this pull request Jan 2, 2023
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