bendu commented on PR #2899:
URL: 
https://github.com/apache/datafusion-sqlparser-rs/pull/2899#issuecomment-6862733610

   The revised approach removes the subscript-context flag and cache-key 
changes. It limits rollback to custom-type names with numeric-sized brackets 
followed by `:`
   
   There is one compatibility caveat: `main` accepts `SELECT mood[2] :items` as 
a typed placeholder. The revised parser rejects it in PostgreSQL and can 
reinterpret it as JSON access in Generic/DuckDB/Redshift, or as a named 
argument inside function calls. PostgreSQL 18.6's grammar and DuckDB 2.0 both 
reject this type-prefix parameter syntax, but downstream tools using sqlparser 
for SQL templates could rely on the previous AST.
   
   I found a pre-existing issue in main unchanged here. `tags[date[1]:date[2]]` 
still parses as a typed value rather than a slice. Because `date` is recognized 
as a built-in type, it bypasses the custom-type guard and still misparses. This 
is not a new regression and not addressed in this PR.


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