yussypu opened a new pull request, #3062:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/3062

   <!-- comma separated, or `none` -->
   Dialects: Spark
   
   Closes #3048
   
   `SELECT struct();` failed with `Expected: an expression, found: )`. Spark 
accepts it and returns an empty struct: 
https://spark.apache.org/docs/latest/api/sql/index.html#struct
   
   This adds `Dialect::supports_empty_struct_literal`, enabled for Spark. When 
it is set and the literal has no typed fields, `STRUCT()` parses as 
`Expr::Struct` with no values and displays as `STRUCT()`. Other dialects with 
struct literals still reject it, and the test covers both.
   
   AI assistance: drafted with Claude.


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