huan233usc opened a new pull request, #16982:
URL: https://github.com/apache/iceberg/pull/16982
Geometry and geography columns map to a BINARY Parquet column carrying a
geometry/geography logical type, the schema mapping added in #16765. That PR
deliberately left the value path as a follow-up: the writer threw
`UnsupportedOperationException` and the reader failed on the unsupported
logical
type. This PR wires up the value path.
Geo values are pure WKB, and Iceberg represents them in memory as a
`ByteBuffer`
(`Type.TypeID.GEOMETRY` / `GEOGRAPHY` map to `ByteBuffer.class`), so the
reader
and writer reuse `ParquetValueReaders`/`ParquetValueWriters.byteBuffers` —
the
same primitive already used for BSON. The change is in `BaseParquetReaders` /
`BaseParquetWriter`, so both the generic and internal object models inherit
it.
Testing:
- Enables the shared `DataTest` round-trip coverage for geospatial types in
the
generic Parquet reader/writer (`supportsGeospatial()`), exercising
geometry and
geography across multiple CRS and edge algorithms with randomly generated
WKB
values.
- Adds an explicit WKB round-trip test (`TestParquetDataWriter`) covering
geometry, geography, and null values through the `DataWriter` path.
--
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]