jdye64 opened a new issue, #2943:
URL: https://github.com/apache/arrow-datafusion/issues/2943

   **Describe the bug**
   When running the query
   ```
   SELECT * FROM a
               UNION SELECT * FROM b
               UNION SELECT * FROM c
           ORDER BY b NULLS FIRST, c NULLS FIRST
   ```
   I noticed that the `schema` returned from 
[&plan.schema()](https://github.com/apache/arrow-datafusion/blob/master/datafusion/expr/src/utils.rs#L579)
 does not have the qualifiers in the result
   
   ```
   DFSchema { fields: [DFField { qualifier: None, field: Field { name: "b", 
data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, 
metadata: None } }, DFField { qualifier: None, field: Field { name: "c", 
data_type: Utf8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: 
None } }], metadata: {} }
   ```
   
   The explain of the `Union` is ...
   ```
   Union
     Projection: #a.b, #a.c
       TableScan: a projection=[b, c]
     Projection: #b.b, #b.c
       TableScan: b projection=[b, c]
     Projection: #c.b, #c.c
       TableScan: c projection=[b, c]
   ```
   
   **To Reproduce**
   Invoke `utils.rs` function `exprlist_to_fields` with the information 
supplied above.
   
   **Expected behavior**
   The qualifiers be present in the resulting schema.
   
   **Additional context**
   None
   


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