SaymV opened a new pull request, #2859:
URL: https://github.com/apache/iceberg-python/pull/2859
Closes #1820
# Rationale for this change
Apache Iceberg v3 introduces native `geometry` and `geography` primitive
types.
This PR adds spec-compliant support for those types in PyIceberg, including:
- New primitive types with parameter handling and format-version enforcement
- Schema parsing and round-trip serialization
- Avro mapping using WKB bytes
- PyArrow / Parquet integration with version-aware fallbacks
- Unit test coverage for type behavior and compatibility constraints
A full design and scope discussion is available in the accompanying RFC:
📄 **RFC: [Iceberg v3 Geospatial Primitive
Types](docs/dev/rfc-geospatial-types.md)**
# Are these changes tested?
Yes.
- Unit tests cover:
- Type creation (default and custom parameters)
- `__str__` / `__repr__` round-tripping
- Equality, hashing, and pickling
- Format version enforcement (v3-only)
- PyArrow-dependent behavior is version-gated and conditionally tested
# Are there any user-facing changes?
Yes.
- Users may now declare `geometry` and `geography` columns in Iceberg v3
schemas
- Parquet files written with PyArrow ≥ 21 preserve GEO logical types when
available
- Limitations (e.g. no WKB↔WKT conversion, no spatial predicates) are
documented
<!-- Changelog label added -->
--
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]