takaaki7 opened a new pull request, #4975:
URL: https://github.com/apache/calcite/pull/4975

   ## Summary
   
   - Adds support for BigQuery-style array literals written without the `ARRAY` 
keyword, e.g. `SELECT [1, 2, 3]`, when conformance is `BIG_QUERY` (also 
`BABEL`, `LENIENT`).
   - Introduces `SqlConformance#allowBareBracketArrayLiteral()` and gates a new 
alternative in the JavaCC `ArrayConstructor` production with it. The new 
alternative emits the same `ARRAY_VALUE_CONSTRUCTOR` call used by `ARRAY[...]`, 
so validation, type derivation, and unparse paths require no other changes.
   - Fixes [CALCITE-7566](https://issues.apache.org/jira/browse/CALCITE-7566).
   
   ## Test plan
   
   - [x] New `SqlParserTest#testBareBracketArrayLiteral` covers `[1, 2, 3]`, 
empty `[]`, nested `[[1, 2], [3, 4]]`, subscript `[10, 20, 30][1]`, and `SELECT 
[1, 2, 3]` under `BIG_QUERY`; also asserts `BABEL`/`LENIENT` accept and 
`DEFAULT`/`STRICT_2003` reject.
   - [x] `./gradlew :core:test --tests CoreSqlParserTest --tests 
SqlUnParserTest` — 991 passed, 0 failed (9 pre-existing skips).
   - [x] JavaCC reports no new choice conflicts (the two pre-existing warnings 
near lines 1975 and 3703 are unchanged).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to