alamb commented on code in PR #27972:
URL: https://github.com/apache/datafusion/pull/27972#discussion_r4790612141
##########
datafusion/physical-expr-common/src/metrics/mod.rs:
##########
@@ -89,26 +89,24 @@ impl Display for Metric {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.value.name())?;
- let mut iter = self
- .partition
- .iter()
- .map(|partition| Label::new("partition", partition.to_string()))
- .chain(self.labels().iter().cloned())
- .peekable();
-
// print out the labels specially
- if iter.peek().is_some() {
+ if self.partition.is_some() || !self.labels().is_empty() {
Review Comment:
I think I cleaned this code up here:
https://github.com/apache/datafusion/pull/27966
So you'll have to merge up from main to resolve the conflct
##########
datafusion/physical-plan/src/repartition/mod.rs:
##########
@@ -1551,14 +1556,19 @@ struct RepartitionMetrics {
repartition_time: metrics::Time,
/// Time in nanos for sending resulting batches to channels.
///
- /// One metric per output partition.
- send_time: Vec<metrics::Time>,
+ /// One metric per used output partition, registered on first use. Delaying
+ /// registration avoids creating metrics for every input/output partition
+ /// pair, which is significant for operators with many partitions.
+ send_time: Vec<Option<metrics::Time>>,
Review Comment:
do we need to delay label creation now given there are no allocations?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]