RatulDawar commented on code in PR #23344:
URL: https://github.com/apache/datafusion/pull/23344#discussion_r3531584980


##########
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/mod.rs:
##########
@@ -1076,6 +1089,35 @@ fn make_group_column(field: &Field) -> Result<Box<dyn 
GroupColumn>> {
     );
     Ok(v.into_iter().next().unwrap())
 }
+/// Returns a comparison cost tier for `data_type` (1 = cheapest, 5 = most 
expensive).
+/// Used to order columns in [`GroupValuesColumn::compare_order`] so cheap 
comparisons
+/// eliminate rows before expensive ones are evaluated.
+/// see <https://github.com/apache/datafusion/issues/23342>
+fn compare_tier(data_type: &DataType) -> u8 {

Review Comment:
   When `JoinKeyComparator` finds groups matching groups per row similarly, 
correct me if I am wrong. 
[Here](https://github.com/apache/datafusion/blob/2818abb8a/datafusion/physical-plan/src/joins/utils.rs#L1898-L1910)
 the compare method can also use this optimized ordering right ?
    



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