andygrove opened a new issue, #364:
URL: https://github.com/apache/datafusion-spark/issues/364

   ### Describe the bug
   
   datafusion-spark has no Spark-compatible `struct`, so DataFusion's built-in 
one is used. It names unnamed fields `c0, c1, ...`, and Spark names them `col1, 
col2, ...`.
   
   ### To Reproduce
   
   ```sql
   SELECT struct(1, 2, 3);
   ```
   
   datafusion-spark returns `{c0: 1, c1: 2, c2: 3}`.
   
   Spark 4.2.0 returns `{col1: 1, col2: 2, col3: 3}`.
   
   ### Expected behavior
   
   Field names `col1, col2, ...`, as in Spark. A column argument takes the 
column's name in Spark, as in `SELECT struct(a) FROM t`, which has a field `a`.
   
   ### Additional context
   
   This shows in any test that builds a struct, for example 
`map/map_from_arrays.slt`. See also #224 for `named_struct`.
   


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