berkaysynnada commented on code in PR #12414:
URL: https://github.com/apache/datafusion/pull/12414#discussion_r1766369727


##########
datafusion/physical-expr/src/equivalence/properties.rs:
##########
@@ -1524,6 +1524,102 @@ impl Hash for ExprWrapper {
     }
 }
 
+/// Take sort orderings for unioned sides of equal length, and return the 
unioned ordering.
+///
+/// Example:
+///     child1 = order by a0, b, c
+///     child2 = order by a, b, c
+///     => union's joint order is a0, a, b, c.
+fn calculate_joint_ordering(
+    lhs: &EquivalenceProperties,

Review Comment:
   I didn't actually fully understand why do you need such a function. I think 
its logic is not correct.
   SCHEMA: a-b-c-a0
   CHILD1: (5,15,25,35),(4,15,25,36),(3,15,25,37)
   CHILD2: (5,15,25,35),(6,15,25,34),(7,15,25,33)
   How could we deduce unioned output is (a0, a, b, c)?



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