niyue opened a new issue, #39045: URL: https://github.com/apache/arrow/issues/39045
### Describe the bug, including details regarding any error messages, version, and platform. Acero's union node may have multiple input nodes that have ordered output, so the union node's input batches may contain batch index from previous nodes. However, the union node output doesn't guarantee any order, so it should clear the batch index so that downstream node won't be confused. According to the doc for batch index property: https://github.com/apache/arrow/blob/47dadb02c3426c5bdd0df903dbc0f6ec17c5c784/cpp/src/arrow/compute/exec.h#L223-L225 The downstream is expected to receive only `strictly monotonic starting at 0 without gaps`, but for a union node with multiple ordered input nodes, it will produce duplicated batch indexes, which is not expected. ### Component(s) C++ -- 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]
