Dandandan commented on a change in pull request #9035:
URL: https://github.com/apache/arrow/pull/9035#discussion_r549486412



##########
File path: rust/datafusion/src/physical_plan/hash_join.rs
##########
@@ -531,14 +560,39 @@ impl Stream for HashJoinStream {
         self.right
             .poll_next_unpin(cx)
             .map(|maybe_batch| match maybe_batch {
-                Some(Ok(batch)) => Some(build_batch(
-                    &batch,
-                    &self.left_data,
-                    &self.on_right,
-                    &self.join_type,
-                    &self.schema,
-                )),
-                other => other,
+                Some(Ok(batch)) => {
+                    let start = Instant::now();
+                    let result = build_batch(
+                        &batch,
+                        &self.left_data,
+                        &self.on_right,
+                        &self.join_type,
+                        &self.schema,
+                    );
+                    self.num_input_batches += 1;
+                    self.num_input_rows += batch.num_rows();
+                    match result {
+                        Ok(ref batch) => {
+                            self.join_time += start.elapsed().as_millis() as 
usize;
+                            self.num_output_batches += 1;
+                            self.num_output_rows += batch.num_rows();
+                        }
+                        _ => {}
+                    }
+                    Some(result)
+                }
+                other => {
+                    debug!(
+                        "Processed {} probe-side input batches containing {} 
rows and \

Review comment:
       Maybe we can make this a bit less verbose? `Processed  {} rows 
probe-side and {} output rows in {} ms` or something like that? 




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to