rkrishn7 commented on code in PR #15242:
URL: https://github.com/apache/datafusion/pull/15242#discussion_r2010510700


##########
datafusion/sql/tests/sql_integration.rs:
##########
@@ -1901,8 +1901,9 @@ fn union_by_name_different_columns() {
         \n    Projection: NULL AS Int64(1), order_id\
         \n      Projection: orders.order_id\
         \n        TableScan: orders\
-        \n    Projection: orders.order_id, Int64(1)\
-        \n      TableScan: orders";
+        \n    Projection: Int64(1), order_id\

Review Comment:
   The `Projection` is coming from the change in this PR that unconditionally 
wraps input nodes with a `Projection`. The ordering is like this because of the 
ordering of the schema columns we use to calculate the expression list for the 
wrapped projection. They are essentially in alphabetical order.
   
   But thanks for catching this. I agree, the ordering seems incorrect here. I 
think the ordering should be driven by the ordering on the lhs (this seems to 
also be what duckdb does)



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to