EnricoMi commented on code in PR #44083:
URL: https://github.com/apache/arrow/pull/44083#discussion_r1824356212


##########
cpp/src/arrow/dataset/scanner.cc:
##########
@@ -1057,9 +1057,12 @@ Result<acero::ExecNode*> MakeScanNode(acero::ExecPlan* 
plan,
         batch->values.emplace_back(partial.record_batch.index);
         batch->values.emplace_back(partial.record_batch.last);
         batch->values.emplace_back(partial.fragment.value->ToString());
+        if (index != compute::kUnsequencedIndex) batch->index = index++;
         return batch;
       });

Review Comment:
   Looks like you are adding the batch index here, which is already done by the 
`SourceNode` when `ordering = Ordering::Implicit()` (see line 153-155):
   
https://github.com/apache/arrow/blob/567f9c596ed8e5b9c4435172442997874a4764e0/cpp/src/arrow/acero/source_node.cc#L134-L162
   This seems redundant.



-- 
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]

Reply via email to