terrymanu commented on PR #39102: URL: https://github.com/apache/shardingsphere/pull/39102#issuecomment-5242185684
Thanks for following up. The finding is retained, with the scope clarified. Please handle the `SYSTEM_USER`-specific boundary in this PR. Adding `SYSTEM_USER` to the [unparenthesized-function set](https://github.com/apache/shardingsphere/blob/2ea43e5bbde1c798349c134c1a9ba1c971b71034/database/connector/dialect/sql92/src/main/java/org/apache/shardingsphere/database/connector/sql92/metadata/database/option/SQL92FunctionOption.java#L31-L35) newly causes `t."SYSTEM_USER"` to take the [early-return path](https://github.com/apache/shardingsphere/blob/2ea43e5bbde1c798349c134c1a9ba1c971b71034/infra/binder/core/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/dml/expression/type/ColumnSegmentBinder.java#L141-L143) instead of being bound as a quoted column. Adding it to [`unreservedWord`](https://github.com/apache/shardingsphere/blob/2ea43e5bbde1c798349c134c1a9ba1c971b71034/parser/sql/engine/dialect/sql92/src/main/antlr4/imports/sql92/BaseRule.g4#L65-L85) also exposes it through generic identifier and regular-function contexts. This PR does not need to solve the broader pre-existing quote-insensitive behavior for names already in the set or for other dialects; that can be tracked in a separate issue. For this PR, please preserve these boundaries: - Bare `SYSTEM_USER` is parsed and bound as the SQL-92 niladic value. - `t."SYSTEM_USER"` remains a quoted column and receives normal column-bound metadata. - Generic identifier uses and `SYSTEM_USER()` are not admitted unless supported by the SQL-92 contract. - The regression test exercises the parser-to-binder path, not only the parser AST. Once these `SYSTEM_USER` cases are covered, the broader binder behavior can be followed up separately. -- 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]
