spark
spark copied to clipboard
[SQL][Minor] Disable Recursive CTE self-references from window functions
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.
Let's file a JIRA. I don't think this is a minor.
the doc gen failure is unrelated, thanks, merging to master!