kevinjqliu commented on issue #584: URL: https://github.com/apache/iceberg-python/issues/584#issuecomment-2041172613
Thanks for reporting this! And providing a reproducible example. Here's what I've found. In the `_task_to_table` function, the provided schema is modified before its passed to the underlying arrow Scanner. This is done in `sanitize_column_names` [here](https://github.com/apache/iceberg-python/blob/4148edb5e28ae88024a55e0b112238e65b873957/pyiceberg/io/pyarrow.py#L970) The `file_project_schema` field is then passed into the Scanner, which leads to the error above. The schema name is changed from `TEST:A1B2.RAW.ABC-GG-1-A` to `TEST_x3AA1B2_x2ERAW_x2EABC_x2DGG_x2D1_x2DA`. The read will work if you comment out the schema modification ([L981](https://github.com/apache/iceberg-python/blob/4148edb5e28ae88024a55e0b112238e65b873957/pyiceberg/io/pyarrow.py#L981)) and just return the `arrow_table` instead of [L1014](https://github.com/apache/iceberg-python/blob/4148edb5e28ae88024a55e0b112238e65b873957/pyiceberg/io/pyarrow.py#L1014) -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org