s5dsn-eqee opened a new issue, #2573: URL: https://github.com/apache/datafusion-sqlparser-rs/issues/2573
ClickHouse allows accessing tuple elements by 1-based index with dot syntax: https://clickhouse.com/docs/sql-reference/data-types/tuple#addressing-tuple-elements ```sql SELECT t.1 FROM (SELECT (1, 'a') AS t) SELECT (1, 'a').1 SELECT tuple(1, 'a').2 SELECT arr[1].1 FROM t All of these fail with ClickHouseDialect: sql parser error: Expected: end of statement, found: .1 at Line: 1, Column: 9 The tokenizer reads .1 after an identifier, ) or ] as a float literal instead of a period followed by an integer, so the compound field access parser never sees it. Expected AST is Expr::CompoundFieldAccess with AccessExpr::Dot(Expr::Value(Number(1))), which is the shape the parser already produces for x . 1 written with spaces. ``` -- 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]
