huan233usc opened a new pull request, #16765:
URL: https://github.com/apache/iceberg/pull/16765

   ## What
   
   Map Iceberg `GEOMETRY` and `GEOGRAPHY` primitive types to and from Parquet's 
geometry / geography logical type annotations on a `BINARY` column.
   
   - `TypeToMessageType`: emit `GEOMETRY` / `GEOGRAPHY` as `BINARY` annotated 
with `LogicalTypeAnnotation.geometryType` / `geographyType`, propagating the 
CRS and (for geography) the edge interpolation algorithm. Iceberg and Parquet 
share the same algorithm names (`SPHERICAL`, `VINCENTY`, `THOMAS`, `ANDOYER`, 
`KARNEY`), so the algorithm is mapped by name.
   - `MessageTypeToType`: read those annotations back into `Types.GeometryType` 
/ `Types.GeographyType`, restoring the CRS and edge algorithm.
   
   ## Why
   
   This is the first step of plumbing the geo value path through Parquet. It is 
intentionally **schema mapping only** — the generic value read/write path 
(`BaseParquetReaders` / `BaseParquetWriter`) and the `ParquetMetrics` guard for 
geo columns are separate follow-ups, so this PR is small and easy to review.
   
   ## Tests
   
   `TestParquetSchemaUtil#testGeospatialTypeRoundTrip` round-trips a schema 
with default-CRS geometry, an explicit-CRS geometry, and geographies with 
explicit edge algorithms through `ParquetSchemaUtil.convert` in both directions.


-- 
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]

Reply via email to