iffyio commented on code in PR #1941:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/1941#discussion_r2204189666
##########
src/dialect/snowflake.rs:
##########
@@ -365,6 +364,18 @@ impl Dialect for SnowflakeDialect {
false
}
+ // `LIMIT` can be considered an alias as long as it's not followed
by a value. For example:
+ // `SELECT * FROM tbl LIMIT WHERE 1=1` - alias
+ // `SELECT * FROM tbl LIMIT 3` - not an alias
+ Keyword::LIMIT
+ if matches!(
+ parser.peek_token().token,
+ Token::Number(_, _) | Token::Placeholder(_)
Review Comment:
from their [docs they seem to
mention](https://docs.snowflake.com/en/sql-reference/constructs/limit#parameters)
that null and empty string, `$` values are possible, could we also detect for
those here?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]