pitrou commented on code in PR #14480:
URL: https://github.com/apache/arrow/pull/14480#discussion_r1004535775
##########
cpp/src/arrow/compute/exec/exec_plan.cc:
##########
@@ -602,7 +602,9 @@ Future<std::vector<ExecBatch>>
DeclarationToExecBatchesAsync(Declaration declara
.Then([collected_fut, exec_plan]() -> Result<std::vector<ExecBatch>> {
ARROW_ASSIGN_OR_RAISE(auto collected, collected_fut.result());
return ::arrow::internal::MapVector(
- [](std::optional<ExecBatch> batch) { return std::move(*batch); },
+ [](std::optional<ExecBatch> batch) {
+ return ARROW_PREDICT_TRUE(batch) ? std::move(*batch) :
ExecBatch();
Review Comment:
> Does value_or use something like ARROW_PREDICT_TRUE underneath?
Probably not, but that probably doesn't matter either.
--
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]