comphead commented on code in PR #16675:
URL: https://github.com/apache/datafusion/pull/16675#discussion_r2185864775


##########
datafusion/physical-plan/src/joins/sort_merge_join.rs:
##########
@@ -2032,7 +2034,10 @@ impl SortMergeJoinStream {
         let record_batch =
             concat_batches(&self.schema, 
&self.staging_output_record_batches.batches)?;
         self.join_metrics.output_batches.add(1);
-        self.join_metrics.output_rows.add(record_batch.num_rows());
+        let _ = self
+            .join_metrics
+            .baseline_metrics
+            .record_poll(Poll::Ready(Some(Ok(record_batch.clone()))));

Review Comment:
   I would think cloning and returning an entire `record_batch` would be 
expensive, than just a single i64 that is `num_rows`



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

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to