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

LIMIT Push-down logical plan optimization for Extension nodes #12685

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

austin362667
Copy link
Contributor

@austin362667 austin362667 commented Sep 30, 2024

Which issue does this PR close?

Closes #12679.

Rationale for this change

As per issue depicted.

What changes are included in this PR?

Modify UserDefinedLogicalNodeCore/UserDefinedLogicalNode traits to check if its safe to push the limit to the children or not, via allows_limit_to_inputs, and also update the related interfaces.

Are these changes tested?

Yes, I've add several tests in datafusion/optimizer/src/push_down_limit.rs. Please correct me if it's wrong cases or needs more tests.

Are there any user-facing changes?

No user-facing changes.

But, interface changed in UserDefinedLogicalNodeCore/UserDefinedLogicalNode traits.

Signed-off-by: Austin Liu <[email protected]>

Add rewrite rule for `push-down-limit` for `Extension`

Signed-off-by: Austin Liu <[email protected]>
@github-actions github-actions bot added logical-expr Logical plan and expressions optimizer Optimizer rules core Core DataFusion crate labels Sep 30, 2024
@github-actions github-actions bot added substrait proto Related to proto crate labels Sep 30, 2024
Signed-off-by: Austin Liu <[email protected]>
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @austin362667 Overall looks to me! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules proto Related to proto crate substrait
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support PushDownLimit for LogicalPlan::Extension
3 participants