chitralverma commented on issue #7067: URL: https://github.com/apache/iceberg/issues/7067#issuecomment-1665434417
@Fokko saw the video and approach, I checked this out before. The problem is that `iceberg_table.scan().to_arrow()` actually returns a pyarrow `Table` not a pyarrow dataset. Creating a pyarrow table effectively causes materialisation which would therefore be lazy. See this behaviour [here](https://github.com/apache/iceberg/blob/ba3653edce17b3d5abc1a34f13331e91b1de1fa9/python/pyiceberg/table/__init__.py#L815). I guess the changes need to be done on the pyiceberg side to return a pyarrow `Dataset` (lazy) and not a pyarrow `Table` (eager). this pyarrow dataset can then be easily fed to polars. If you see delta also has the [same.](https://github.com/delta-io/delta-rs/blob/2f9a67f79f3d06367108925424609dfa1d24786e/python/deltalake/table.py#L487) -- 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]
