iffyio commented on code in PR #2337:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2337#discussion_r3212718252
##########
src/dialect/clickhouse.rs:
##########
@@ -72,6 +72,11 @@ impl Dialect for ClickHouseDialect {
true
}
+ /// See
<https://clickhouse.com/docs/sql-reference/functions/tuple-functions#tupleelement>
Review Comment:
does this behavior differ from `parse_compound_expr` handling (if so how, on
a first glance they look identical syntax wise)?
##########
src/tokenizer.rs:
##########
@@ -4303,6 +4331,98 @@ mod tests {
);
}
+ #[test]
+ fn tokenize_clickhouse_tuple_element_access() {
+ let dialects = all_dialects_where(|dialect|
dialect.supports_tuple_element_access());
+
+ // After a Word, RBracket, or RParen, `.<digit>` is split into `Period`
+ // and a separate integer `Number`, so the parser can build a
+ // CompoundFieldAccess instead of seeing a single decimal literal.
+ dialects.tokenizes_to(
Review Comment:
not sure I follow the patch/tests - are we saying that without this PR, a
sql like `t.1` tokenizes to something other than what's being asserted (if so
what does the previous behavior tokenized to)?
--
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]