2010YOUY01 commented on code in PR #24748:
URL: https://github.com/apache/datafusion/pull/24748#discussion_r3888361671


##########
datafusion/physical-plan/benches/aggregate_filter.rs:
##########
@@ -0,0 +1,277 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+//! Benchmarks grouped aggregate `FILTER` processing through `AggregateExec`.
+//!
+//! The benchmark includes group-key, filter, and aggregate-argument 
evaluation,
+//! group interning, and `GroupsAccumulator` updates. It intentionally uses an
+//! in-memory physical plan to exclude SQL planning and file I/O.
+
+use std::hint::black_box;
+use std::sync::Arc;
+
+use arrow::array::{BooleanArray, Float64Array, UInt32Array};
+use arrow::datatypes::{DataType, Field, Schema, SchemaRef};
+use arrow::record_batch::RecordBatch;
+use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main};
+use datafusion_execution::TaskContext;
+use datafusion_expr::Operator;
+use datafusion_functions_aggregate::sum::sum_udaf;
+use datafusion_physical_expr::PhysicalExpr;
+use datafusion_physical_expr::aggregate::{AggregateExprBuilder, 
AggregateFunctionExpr};
+use datafusion_physical_expr::expressions::{BinaryExpr, col};
+use datafusion_physical_plan::aggregates::{
+    AggregateExec, AggregateMode, PhysicalGroupBy,
+};
+use datafusion_physical_plan::test::TestMemoryExec;
+use datafusion_physical_plan::{ExecutionPlan, collect};
+use rand::SeedableRng;
+use rand::rngs::StdRng;
+use rand::seq::SliceRandom;
+use tokio::runtime::Runtime;
+
+const NUM_ROWS: usize = 65_536;
+const BATCH_SIZE: usize = 8_192;
+const NUM_GROUPS: usize = 1_024;

Review Comment:
   I think this is a key axis to vary, we could add a very small and a very 
high cardinality variant.



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