gabotechs commented on code in PR #16195: URL: https://github.com/apache/datafusion/pull/16195#discussion_r2109744098
########## datafusion/physical-plan/src/metrics/value.rs: ########## @@ -401,6 +401,22 @@ pub enum MetricValue { StartTimestamp(Timestamp), /// The time at which execution ended EndTimestamp(Timestamp), + Custom { + /// The provided name of this metric + name: Cow<'static, str>, + /// A custom implementation of the metric value. + value: Arc<dyn CustomMetricValue>, Review Comment: Probably the implementors should be the ones deciding how this value is being cloned. I imagine that for the same reason that other Metrics are not cloned by reference, this custom metric value should also not be cloned by reference (or at least let implementors decide) EDIT: I see that all the other metrics are actually wrapping it's inner value with an `Arc`, so indeed they are being cloned by reference in the end, so this might be fine -- 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