| commit | 8bfb16cf063d121a177d43fec01620e1a5e6d84a | [log] [tgz] |
|---|---|---|
| author | Kevin Liu <kevinjqliu@users.noreply.github.com> | Tue Feb 25 21:09:51 2025 -0500 |
| committer | GitHub <noreply@github.com> | Tue Feb 25 21:09:51 2025 -0500 |
| tree | 1233127271adf3215f16e967a640d877c5ae048f | |
| parent | acb3c47ff6184278337863c5f507af8eb1b79ec6 [diff] |
fix loading `in-memory` catalog (#1725) Previously `CatalogType` was fetched by key, `CatalogType[provided_catalog_type.upper()]` (note the bracket) This PR changes `CatalogType` to be fetched by value, `CatalogType(provided_catalog_type.lower())` (note the parenthesis) https://stackoverflow.com/questions/29799235/python-enum-value2member-map-accessor This fix loading `in-memory` catalog, `load_catalog("catalog", **{"type": "in-memory"})`. Previously, `"in-memory"` caused a key error because its key is `IN_MEMORY`. Note the `-` vs `_`. https://github.com/apache/iceberg-python/blob/1d24e71041e35e26e126aa4508ed7384e8aa031c/pyiceberg/catalog/__init__.py#L113-L119 We want `in-memory` and not `in_memory` to match spark https://github.com/apache/iceberg-python/blob/1d24e71041e35e26e126aa4508ed7384e8aa031c/dev/spark-defaults.conf#L35
PyIceberg is a Python library for programmatic access to Iceberg table metadata as well as to table data in Iceberg format. It is a Python implementation of the Iceberg table spec.
The documentation is available at https://py.iceberg.apache.org/.