Standing-Man commented on code in PR #16675: URL: https://github.com/apache/datafusion/pull/16675#discussion_r2186251681
########## 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: you're right, `record_poll` involves an expensive clone, while `record_output` can achieve the same result more efficiently. -- 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