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

Function ProjectionOverheadIsolated

cpp/src/arrow/acero/project_benchmark.cc:57–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57static 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
68arrow::compute::Expression complex_expression =
69 and_(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