yjshen commented on code in PR #9885:
URL: https://github.com/apache/arrow-datafusion/pull/9885#discussion_r1545771205
##########
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:
A minor one, I wonder if `rows_spilled`, and `bytes_spilled` would be more
natural.
--
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]