MCPcopy Create free account
hub / github.com/apache/arrow / FilterOverheadIsolated

Function FilterOverheadIsolated

cpp/src/arrow/acero/filter_benchmark.cc:90–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90static void FilterOverheadIsolated(benchmark::State& state, Expression expr) {
91 const int32_t batch_size = static_cast<int32_t>(state.range(0));
92 const int32_t num_batches = kTotalBatchSize / batch_size;
93 arrow::acero::BatchesWithSchema data = MakeRandomBatches(
94 schema({field("i64", int64()), field("bool", boolean())}), num_batches, batch_size);
95 FilterNodeOptions options = FilterNodeOptions{expr};
96 ASSERT_OK(BenchmarkIsolatedNodeOverhead(state, expr, num_batches, batch_size, data,
97 "filter", options));
98}
99
100arrow::compute::Expression complex_expression =
101 less(less(field_ref("i64"), literal(20)), greater(field_ref("i64"), literal(0)));

Callers

nothing calls this directly

Calls 4

MakeRandomBatchesFunction · 0.85
schemaFunction · 0.50
fieldFunction · 0.50

Tested by

no test coverage detected