rluvaton commented on code in PR #24024:
URL: https://github.com/apache/datafusion/pull/24024#discussion_r3727411574
##########
datafusion/physical-plan/src/aggregates/group_values/metrics.rs:
##########
@@ -19,6 +19,43 @@
use crate::metrics::{ExecutionPlanMetricsSet, MetricBuilder, Time};
+#[derive(Clone)]
+pub(crate) struct AggregateArgumentMetrics {
+ argument_times: Vec<Time>,
+}
+
+impl AggregateArgumentMetrics {
+ pub(crate) fn new<T>(
+ metrics: &ExecutionPlanMetricsSet,
+ partition: usize,
+ aggregate_labels: impl IntoIterator<Item = T>,
+ ) -> Self
+ where
+ T: Into<String>,
+ {
+ let argument_times = aggregate_labels
+ .into_iter()
+ .enumerate()
+ .map(|(idx, label)| {
+ MetricBuilder::new(metrics)
+ .with_new_label("aggregate", label.into())
+ .subset_time(format!("agg_expr_{idx}_arguments_time"),
partition)
Review Comment:
Having only the id will make it very annoying for user experience, maybe we
can also include the expression name
--
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]