nanjeshramesh commented on PR #20402:
URL: https://github.com/apache/druid/pull/20402#issuecomment-5783166788

   Good catch, thanks both. You are right that `SqlTypeName1` is reached from 
`DataType()` broadly, not just CAST, and that this broke 
`testColumnNamedProjection`.
   
   Fixed by reverting the `SqlTypeName1` change and instead recognizing `LONG` 
only inside the `CAST`/`SAFE_CAST`/`TRY_CAST` production, ahead of `dt = 
DataType()`, constructing the same `SqlDataTypeSpec`/`BIGINT` node 
`SqlTypeName1` would have. `LONG` stays in `nonReservedKeywordsToAdd` so it is 
still usable unquoted as an identifier everywhere, exactly as before this PR.
   
   `DruidSqlDdlParserTest#testColumnNamedProjection` and the rest of 
`DruidSqlDdlParserTest` (38 tests) now pass unchanged, along with 
`DruidSqlParserTest` and the CAST/LONG tests in `CalciteQueryTest` (66 tests 
total). Updated the docs and release note wording to say this is scoped to CAST 
only, and does not apply to DDL column types, EXTEND, or other type positions, 
per @kdelay's point about widening vs. scoping — going with scoping down since 
that is what the issue actually asked for and keeps existing DDL behavior 
untouched.


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

Reply via email to