You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "yoavcloud (via GitHub)" <gi...@apache.org> on 2024/12/17 10:35:17 UTC
[I] Parser rejects column aliases that Snowflake accepts [datafusion-sqlparser-rs]
yoavcloud opened a new issue, #1607:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1607
For example:
`SELECT col col_alias FROM tbl` --> accepted by both Snowflake and the parser
`SELECT col cluster FROM tbl` --> accepted by Snowflake but not by the parser
`SELECT col AS cluster FROM tbl` --> accepted by both Snowflake and the parser (this one really bakes my noodle...)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Parser rejects column aliases that Snowflake accepts [datafusion-sqlparser-rs]
Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on issue #1607:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1607#issuecomment-2646091587
Done in https://github.com/apache/datafusion-sqlparser-rs/pull/1632
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Parser rejects column aliases that Snowflake accepts [datafusion-sqlparser-rs]
Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio closed issue #1607: Parser rejects column aliases that Snowflake accepts
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1607
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [I] Parser rejects column aliases that Snowflake accepts [datafusion-sqlparser-rs]
Posted by "yoavcloud (via GitHub)" <gi...@apache.org>.
yoavcloud commented on issue #1607:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1607#issuecomment-2562220388
The underlying issue here is that when a column alias is provided implicitly, i.e. without the use of the `AS` keyword, the parser has to decide if the next word after a column ident is an alias or the beginning of some other construct that should be parsed differently.
For example:
`SELECT 1 LIMIT` on Snowflake produces a result set with one column named `limit`, but the statement `SELECT 1 LIMIT 5` produces a result set with one column named `1` (the limit is parsed as a limit on the number of rows in the result set).
A possible solution is to make this decision more accurate. Instead of looking at just the next word, the parser should look further ahead to identify constructs that should not be parsed as an alias.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org