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

Method ProcessBatch

cpp/src/arrow/acero/project_node.cc:86–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 const char* kind_name() const override { return "ProjectNode"; }
85
86 Result<ExecBatch> ProcessBatch(ExecBatch batch) override {
87 std::vector<Datum> values{exprs_.size()};
88 for (size_t i = 0; i < exprs_.size(); ++i) {
89 arrow::util::tracing::Span span;
90 START_COMPUTE_SPAN(span, "Project",
91 {{"project.type", exprs_[i].type()->ToString()},
92 {"project.length", batch.length},
93 {"project.expression", exprs_[i].ToString()}});
94 ARROW_ASSIGN_OR_RAISE(Expression simplified_expr,
95 SimplifyWithGuarantee(exprs_[i], batch.guarantee));
96
97 ARROW_ASSIGN_OR_RAISE(
98 values[i], ExecuteScalarExpression(simplified_expr, batch,
99 plan()->query_context()->exec_context()));
100 }
101 return ExecBatch{std::move(values), batch.length};
102 }
103
104 protected:
105 std::string ToStringExtra(int indent = 0) const override {

Callers

nothing calls this directly

Calls 8

ExecuteScalarExpressionFunction · 0.85
planFunction · 0.85
exec_contextMethod · 0.80
query_contextMethod · 0.80
ARROW_ASSIGN_OR_RAISEFunction · 0.70
sizeMethod · 0.45
ToStringMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected