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


##########
datafusion/physical-plan/src/joins/cross_join.rs:
##########
@@ -632,7 +632,7 @@ impl<T: BatchTransformer> CrossJoinStream<T> {
                     }
 
                     self.join_metrics.output_batches.add(1);
-                    self.join_metrics.output_rows.add(batch.num_rows());
+                    self.join_metrics.baseline.record_output(batch.num_rows());

Review Comment:
   I suggest to use 
https://github.com/apache/datafusion/blob/c4d2cd720724aa1b9c0e819a015f4a0d8ba18cd7/datafusion/physical-plan/src/metrics/baseline.rs#L124
   to keep the implementation consistent with other operators, and the same for 
other join operators in this PR.



##########
datafusion/physical-plan/src/joins/utils.rs:
##########
@@ -1212,12 +1213,19 @@ pub(crate) struct BuildProbeJoinMetrics {
     pub(crate) input_rows: metrics::Count,
     /// Number of batches produced by this operator
     pub(crate) output_batches: metrics::Count,
-    /// Number of rows produced by this operator
-    pub(crate) output_rows: metrics::Count,
+}
+
+impl Drop for BuildProbeJoinMetrics {

Review Comment:
   I don't think it's the best way but I guess it's okay to merge 🤔 If we 
forget to count a specific time period in some join operator, we can fix it in 
the future.
   
   Could you also add a brief comment to explain this drop?



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