Skip to content

Conversation

yoavcloud
Copy link
Contributor

We've encountered a problem parsing statements like SELECT 1, sort FROM tbl which are valid in Snowflake.

The reason is that in the Snowflake dialect, supports_projection_trailing_commas is true. The flow then checks the keyword after the comma to see if it's reserved (FROM for example), and if not, it stops parsing the projection. However, the check relies on Dialect::is_column_alias which wasn't implemented in the Snowflake dialog.

The solution is to align the behavior of the Snowflake dialect to other dialects by overriding Dialect::is_column_alias instead of Dialect::is_select_item_alias.

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @yoavcloud!
cc @alamb

@iffyio iffyio merged commit ed8757f into apache:main Jul 5, 2025
10 checks passed
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.

2 participants