felipecrv commented on code in PR #15083:
URL: https://github.com/apache/arrow/pull/15083#discussion_r1064793482
##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -163,6 +163,34 @@ Result<ExecBatch> ExecBatch::Make(std::vector<Datum>
values) {
continue;
}
+ if (length != value.length()) {
+ // all the arrays should have the same length
+ return -1;
+ }
Review Comment:
It's a recoverable error in the `ExecBatch::Make` loop when there are only
scalar `Datum`s. I can change it to return an `optional<int64_t>` because I
want to express that inference of the length failing is a non-fatal. `GroupBy`
can use this, but ultimately it's `ExecBatch::Make` that performs the last
validation and returns a more appropriate error `Status`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]