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

[SPARK-51609][SQL] Optimize Recursive CTE execution for simple queries #50402

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Pajaraja
Copy link
Contributor

What changes were proposed in this pull request?

Optimize Recursive CTEs where the recursion is simple, and everything can be done in-memory. Specifically for the cases where the anchor is a LocalRelation or OneRowRelation and the recursion can be done in-memory.

Why are the changes needed?

To optimize Recursive CTEs.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Add a new Suite for testing Recursive CTEs. In there two tests where we test one case each for both LocalRelation and OneRowRelation. Checked that they're faster now.

Was this patch authored or co-authored using generative AI tooling?

No.

@github-actions github-actions bot added the SQL label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant