aocsa commented on a change in pull request #11210:
URL: https://github.com/apache/arrow/pull/11210#discussion_r722857168
##########
File path: cpp/src/arrow/compute/exec/sink_node.cc
##########
@@ -175,9 +175,9 @@ struct OrderBySinkNode final : public SinkNode {
plan()->exec_context()->memory_pool());
if (ErrorIfNotOk(maybe_batch.status())) {
StopProducing();
- bool cancelled = input_counter_.Cancel();
- DCHECK(cancelled);
- finished_.MarkFinished(maybe_batch.status());
+ if (input_counter_.Cancel()) {
Review comment:
Looks like is possible. Some runs in stress mode (`stress -m 16`) enable
`DCHECK(cancelled);`. So a checks is needed.
##########
File path: cpp/src/arrow/compute/exec/filter_node.cc
##########
@@ -98,12 +106,23 @@ class FilterNode : public ExecNode {
void InputReceived(ExecNode* input, ExecBatch batch) override {
DCHECK_EQ(input, inputs_[0]);
-
- auto maybe_filtered = DoFilter(std::move(batch));
- if (ErrorIfNotOk(maybe_filtered.status())) return;
-
- maybe_filtered->guarantee = batch.guarantee;
- outputs_[0]->InputReceived(this, maybe_filtered.MoveValueUnsafe());
+ auto task = [this, batch]() {
+ auto maybe_filtered = DoFilter(std::move(batch));
+ if (ErrorIfNotOk(maybe_filtered.status())) {
+ return maybe_filtered.status();
+ }
+ maybe_filtered->guarantee = batch.guarantee;
+ outputs_[0]->InputReceived(this, maybe_filtered.MoveValueUnsafe());
+ return Status::OK();
+ };
+ auto status = impl_->SubmitTask(task);
+ if (!status.ok()) {
Review comment:
I addressed these comments in the refactored MapNode Class
--
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]