Skip to content

Commit

Permalink
simplify compute
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Jun 10, 2024
1 parent 98a4db8 commit 2907f23
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cpp/src/arrow/compute/expression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,7 @@ Result<Datum> ExecuteScalarExpression(const Expression& expr, const ExecBatch& i
for (size_t i = 0; i < arguments.size(); ++i) {
ARROW_ASSIGN_OR_RAISE(
arguments[i], ExecuteScalarExpression(call->arguments[i], input, exec_context));
if (!arguments[i].is_scalar()) {
all_scalar = false;
}
all_scalar &= arguments[i].is_scalar();
}

int64_t input_length;
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/arrow/compute/expression_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ TEST(Expression, ExecuteCallWithNoArguments) {
}

TEST(Expression, ExecuteChunkedArray) {
// GH-41923: compute should generate the right result if input
// ExecBatch is `chunked_array`.
auto input_schema = struct_({field("a", struct_({
field("a", float64()),
field("b", float64()),
Expand Down

0 comments on commit 2907f23

Please sign in to comment.