mingmwang commented on code in PR #4219:
URL: https://github.com/apache/arrow-datafusion/pull/4219#discussion_r1024131328


##########
datafusion/core/src/physical_optimizer/join_selection.rs:
##########
@@ -68,6 +75,19 @@ fn should_swap_join_order(left: &dyn ExecutionPlan, right: 
&dyn ExecutionPlan) -
     }
 }
 
+fn supports_collect_by_size(
+    plan: &dyn ExecutionPlan,
+    collection_size_threshold: usize,
+) -> bool {
+    if let Some(size) = plan.statistics().total_byte_size {
+        size < collection_size_threshold
+    } else if let Some(row_count) = plan.statistics().num_rows {
+        row_count < collection_size_threshold

Review Comment:
   My original thinking is making the threshold configuration represent both 1M 
in bytes or 1M number of rows.
   Or maybe we can keep two different configuration items explicitly and 
document them clearly..



-- 
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...@arrow.apache.org

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

Reply via email to