erenavsarogullari commented on code in PR #9885:
URL: https://github.com/apache/arrow-datafusion/pull/9885#discussion_r1547127982


##########
datafusion/physical-plan/src/metrics/mod.rs:
##########
@@ -209,6 +209,13 @@ impl MetricsSet {
             .map(|v| v.as_usize())
     }
 
+    /// Convenience: return the total rows of spills, aggregated
+    /// across partitions or `None` if no metric is present
+    pub fn spilled_rows(&self) -> Option<usize> {
+        self.sum(|metric| matches!(metric.value(), 
MetricValue::SpilledRows(_)))

Review Comment:
   Thanks for the review. I think tracking legacy naming convention can be more 
useful but please let me know if there is concern.



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

Reply via email to