rluvaton commented on code in PR #17147: URL: https://github.com/apache/datafusion/pull/17147#discussion_r2281928809
########## datafusion/physical-plan/src/sorts/sort.rs: ########## @@ -62,18 +63,39 @@ use datafusion_physical_expr::PhysicalExpr; use futures::{StreamExt, TryStreamExt}; use log::{debug, trace}; +#[derive(Clone, Debug)] +pub struct LexSortMetrics { + pub time_calculating_lexsort_indices: Time, + + pub time_taking_indices_in_lexsort: Time, +} + +impl LexSortMetrics { + pub fn new(metrics: &ExecutionPlanMetricsSet, partition: usize) -> Self { + Self { + time_calculating_lexsort_indices: MetricBuilder::new(metrics) + .subset_time("time_calculating_lexsort_indices", partition), + time_taking_indices_in_lexsort: MetricBuilder::new(metrics) + .subset_time("time_taking_indices_in_lexsort", partition), + } + } +} Review Comment: I think the naming for this metrics are implementation details, maybe rename this to help the user to understand what each metrics is for? like finding sort indices and coping the data -- 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