spark icon indicating copy to clipboard operation
spark copied to clipboard

[SQL][Minor] Disable Recursive CTE self-references from window functions

Open Pajaraja opened this issue 6 months ago • 1 comments

What changes were proposed in this pull request?

Throw error when a UnionLoopRef is found inside a window function.

Why are the changes needed?

The context of a Recursive CTE is only the result of the previous iteration, so any type of cumulative operations should not be allowed. This is also the reason why self references inside aggregates aren't allowed.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New golden file test.

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

No.

Pajaraja avatar Jun 13 '25 12:06 Pajaraja

Let's file a JIRA. I don't think this is a minor.

HyukjinKwon avatar Jun 14 '25 11:06 HyukjinKwon

the doc gen failure is unrelated, thanks, merging to master!

cloud-fan avatar Jun 24 '25 00:06 cloud-fan