2010YOUY01 commented on code in PR #24820:
URL: https://github.com/apache/datafusion/pull/24820#discussion_r3987080412


##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -1071,10 +1114,14 @@ async fn collect_left_input(
     with_visited_left_side: bool,
     probe_threads_count: usize,
     spill_manager: Option<SpillManager>,
+    target_batch_size: usize,
 ) -> Result<LeftLoad> {
     let schema = stream.schema();
     let metrics = join_metrics;
-    let mut batches: Vec<RecordBatch> = Vec::new();
+    let mut chunks: Vec<RecordBatch> = Vec::new();
+    // Batches at or above half the target size pass through without being 
copied.
+    let mut coalescer = BatchCoalescer::new(Arc::clone(&schema), 
target_batch_size)

Review Comment:
   > The convention does not hold at this operator's build side.
   
   I think it should hold, but there might be some violations here and there, 
we should fix them instead.
   
   The evidence for such convention is no operator is doing this input 
coalescing currently. I think it's a reasonable design, since we don't have to 
introduce complexity/execution overhead in all operators for such 
pre-processing, as long as all operator promise to produce batch-size coalesced 
output.



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