vibhuthespeedst opened a new pull request, #4161: URL: https://github.com/apache/iceberg-python/pull/4161
Closes #4137 # Rationale for this change `table.scan(selected_fields=()).to_arrow()` returned 0 rows instead of the row count with no columns. Two places lost the rows: `_to_requested_schema` builds the struct from zero fields, which has length 0, and `ArrowScan.to_table` uses `pa.concat_tables`, which drops the rows of tables without columns. ## Are these changes tested? Yes, two tests in `tests/io/test_pyarrow.py`, with and without a row filter. Both fail without the fix. ## Are there any user-facing changes? Scans that select no columns now return the right number of rows. Generated-by: AI assistant -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
