gstvg commented on PR #9743:
URL: 
https://github.com/apache/arrow-datafusion/pull/9743#issuecomment-2019191991

   > @gstvg Is it possible to have a syntax like `{"a": 1, "b": 2}` for a named 
struct?
   
   It would require a PR to 
[sqlparser-rs](https://github.com/sqlparser-rs/sqlparser-rs)
   Someone already created an 
[issue](https://github.com/sqlparser-rs/sqlparser-rs/issues/1129)
   
   > struct can remain for the cN convention when you don't care about the 
field name, so we don't have the ambiguous 
   > signature issue about struct() or named_struct()
   >
   >Do not allow partial named struct like struct("valueOrName?", "value" as 
another_name), I think it is confusing and also > not a helpful syntax.
   
   Fair enough
   
   >After the named struct {"a": 1, "b": 2} is completed, we can easily rewrite 
struct to {"c0": 1, "c1": 2}, at the end we only need one struct function.
   
   Yes, after minimal support is merged, and support for the syntax is added on 
sqlparser-rs, it would be trivial to support it, leaving us with a very nice 
support for structs!


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