Skip to content

Support aliased function arguments (expr AS name)#2368

Open
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:aliased-function-args
Open

Support aliased function arguments (expr AS name)#2368
LucaCappelletti94 wants to merge 1 commit into
apache:mainfrom
LucaCappelletti94:aliased-function-args

Conversation

@LucaCappelletti94
Copy link
Copy Markdown
Contributor

PostgreSQL XML functions such as XMLFOREST and XMLATTRIBUTES take aliased arguments, e.g. XMLFOREST(a AS x, b). This syntax currently fails to parse with "Expected: ), found: AS".

This PR adds a supports_aliased_function_args() dialect method (true for PostgreSQL and Generic) and makes the function-call parser wrap expr AS name arguments into the existing Expr::Named variant, so no new AST types are needed.

Part of the work to support PostgreSQL XML functions (split from #2252, follows #2299).

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