adragomir opened a new issue, #11746:
URL: https://github.com/apache/datafusion/issues/11746

   ### Is your feature request related to a problem or challenge?
   
   At the moment, we cannot create tables with deeply nested columns, for 
example a column that has a map of string to list of structs etc. 
   We should have the ability to create deeply nested schemas in SQL
   
   ### Describe the solution you'd like
   
   [DuckDB](https://duckdb.org/) has in its SQL DML dialect some markers / 
functions that allow this: 
   
   ```
   CREATE OR REPLACE TABLE test1 (
        struct1 STRUCT(
          name VARCHAR,
          bools BOOLEAN,
          uint32 UINTEGER,
             -- a list of strings
          tags VARCHAR[]
        ),
           -- a list of structs
        list_struct STRUCT(
          bools BOOLEAN,
          uint32 UINTEGER,
             -- a list of ints
          ints32 INTEGER[]
        )[],
        struct_list STRUCT(
          bools BOOLEAN,
          uint32 UINTEGER,
             -- a list of structs
          products STRUCT(
            qty INT4,
            name VARCHAR
          )[]
        ),
           -- map of string to map
        map_map_struct MAP(
          VARCHAR,
             -- map of string to struct
          MAP(
            VARCHAR,
            STRUCT(
              status VARCHAR,
              changed INTEGER
            )
          )
        )
   );
   ```
   We should have either syntax or functions that we could use to have the same 
result
   
   ### Describe alternatives you've considered
   
   _No response_
   
   ### Additional context
   
   _No response_


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