AlenkaF commented on code in PR #46057:
URL: https://github.com/apache/arrow/pull/46057#discussion_r2034713347
##########
python/pyarrow/acero.py:
##########
@@ -375,7 +396,13 @@ def _filter_table(table, expression):
])
result = decl.to_table(use_threads=True)
if is_batch:
- result = result.combine_chunks().to_batches()[0]
+ batches = result.combine_chunks().to_batches()
+ result = (
+ batches[0]
+ if batches
+ else _empty_record_batch_from_schema(result.schema)
Review Comment:
The logic here might not be wrong (I think you are correct about returning
same type as input type). We might just make it a bit simpler. cc @raulcd
--
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]