Ted-Jiang opened a new pull request, #2389:
URL: https://github.com/apache/arrow-datafusion/pull/2389

   # Which issue does this PR close?
   
   Related #2043.
   
    # Rationale for this change
   Support construct a struct in SQL.
   ```
   select STRUCT(1,2,3);
   +------------------------------------+
   | struct(Int64(1),Int64(2),Int64(3)) |
   +------------------------------------+
   | {"f_0": 1, "f_1": 2, "f_2": 3}     |
   +------------------------------------+
   1 row in set. Query took 0.003 seconds.
   ```
   
   # What changes are included in this PR?
   <!--
   There is no need to duplicate the description in the issue here but it is 
sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   Now the struct Field only support default name like `f_n`
   I want to use `select struct(1 as a)' as field name, but got error in parsing
   ```
    select STRUCT(1 as a);  🤔 Invalid statement: sql parser error: Expected ), 
found: as
   ``` 
   I think it should fix in sql-parse, if wrong plz correct me.
   I will create follow up ticket for this, if this PR is fine.
   
   <!--
   If there are any breaking changes to public APIs, please add the `api 
change` label.
   -->
   


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