rluvaton commented on code in PR #18325:
URL: https://github.com/apache/datafusion/pull/18325#discussion_r2469785141
##########
datafusion/physical-plan/src/aggregates/mod.rs:
##########
@@ -1359,12 +1360,17 @@ fn evaluate(
.collect()
}
-/// Evaluates expressions against a record batch.
-pub fn evaluate_many(
- expr: &[Vec<Arc<dyn PhysicalExpr>>],
+/// Evaluates the aggregate arguments against a record batch to produce the
values for aggregation.
+pub(crate) fn evaluate_aggregate_arguments(
+ aggregate_arguments: &[Vec<Arc<dyn PhysicalExpr>>],
+ group_by_metrics: &GroupByMetrics,
batch: &RecordBatch,
) -> Result<Vec<Vec<ArrayRef>>> {
- expr.iter().map(|expr| evaluate(expr, batch)).collect()
+ let _timer = group_by_metrics.aggregate_arguments_time.timer();
Review Comment:
In case there is no `aggregate_arguments` (e.g. when you only do group by
without any aggregation) this timer can be skipped to avoid the syscall
--
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]