Skip to content

Visit function clauses in source order - #2477

Open
lovasoa wants to merge 1 commit into
apache:mainfrom
lovasoa:fix/function-visitor-order
Open

Visit function clauses in source order#2477
lovasoa wants to merge 1 commit into
apache:mainfrom
lovasoa:fix/function-visitor-order

Conversation

@lovasoa

@lovasoa lovasoa commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Repro:

SELECT LISTAGG(value) WITHIN GROUP (ORDER BY order_key) FILTER (WHERE filter_key)

The visitor currently sees filter_key before order_key, despite the source and formatter ordering.

Declare within_group before filter so derived visitors traverse function clauses in source order.

@lovasoa
lovasoa marked this pull request as ready for review September 1, 2026 20:49
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.

1 participant