| 55 | } |
| 56 | |
| 57 | static void ProjectionOverheadIsolated(benchmark::State& state, Expression expr) { |
| 58 | const int32_t batch_size = static_cast<int32_t>(state.range(0)); |
| 59 | const int32_t num_batches = kTotalBatchSize / batch_size; |
| 60 | |
| 61 | arrow::acero::BatchesWithSchema data = MakeRandomBatches( |
| 62 | schema({field("i64", int64()), field("bool", boolean())}), num_batches, batch_size); |
| 63 | ProjectNodeOptions options = ProjectNodeOptions{{expr}}; |
| 64 | ASSERT_OK(BenchmarkIsolatedNodeOverhead(state, expr, num_batches, batch_size, data, |
| 65 | "project", options)); |
| 66 | } |
| 67 | |
| 68 | arrow::compute::Expression complex_expression = |
| 69 | and_(less(field_ref("i64"), literal(20)), greater(field_ref("i64"), literal(0))); |
nothing calls this directly
no test coverage detected