rluvaton commented on code in PR #18325:
URL: https://github.com/apache/datafusion/pull/18325#discussion_r2470634017


##########
datafusion/physical-plan/src/aggregates/topk_stream.rs:
##########
@@ -140,15 +150,21 @@ impl Stream for GroupedTopKAggregateStream {
                         "Exactly 1 group value required"
                     );
                     let group_by_values = Arc::clone(&group_by_values[0][0]);
-                    let input_values = evaluate_many(
-                        &self.aggregate_arguments,
-                        batches.first().unwrap(),
-                    )?;
+                    let input_values = {
+                        let _timer = 
(!self.aggregate_arguments.is_empty()).then(|| {
+                            
self.group_by_metrics.aggregate_arguments_time.timer()
+                        });
+                        evaluate_many(
+                            &self.aggregate_arguments,
+                            batches.first().unwrap(),
+                        )?
+                    };
                     assert_eq!(input_values.len(), 1, "Exactly 1 input 
required");
                     assert_eq!(input_values[0].len(), 1, "Exactly 1 input 
required");
                     let input_values = Arc::clone(&input_values[0][0]);
 
                     // iterate over each column of group_by values
+                    self.group_by_metrics.time_calculating_group_ids.timer();

Review Comment:
   this timer does nothing, it is immediately dropped 



##########
datafusion/physical-plan/src/aggregates/topk_stream.rs:
##########
@@ -157,7 +173,10 @@ impl Stream for GroupedTopKAggregateStream {
                         trace!("partition {} emit None", self.partition);
                         return Poll::Ready(None);
                     }
-                    let cols = self.priority_map.emit()?;
+                    let cols = {
+                        self.group_by_metrics.emitting_time.timer();

Review Comment:
   this timer does nothing, it is immediately dropped



-- 
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]

Reply via email to