Skip to content

feat: add v3 geometry and geography support - #880

Open
wgtmac wants to merge 1 commit into
apache:mainfrom
wgtmac:v3_geospatial
Open

feat: add v3 geometry and geography support#880
wgtmac wants to merge 1 commit into
apache:mainfrom
wgtmac:v3_geospatial

Conversation

@wgtmac

@wgtmac wgtmac commented Aug 8, 2026

Copy link
Copy Markdown
Member
  • align geospatial type semantics and schema JSON with the v3 spec
  • add bound encoding and Java-compatible intersection evaluation
  • represent WKB as Arrow binary and support Avro byte round trips
  • generate and validate Parquet geospatial logical types
  • preserve count metrics while omitting geospatial byte-order bounds

- align geospatial type semantics and schema JSON with the v3 spec
- add bound encoding and Java-compatible intersection evaluation
- represent WKB as Arrow binary and support Avro byte round trips
- generate and validate Parquet geospatial logical types
- preserve count metrics while omitting geospatial byte-order bounds
Copilot AI lite review requested due to automatic review settings August 8, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Iceberg v3 geospatial (geometry/geography) support across type semantics, JSON schema strings, and file format integrations (Arrow, Avro, Parquet), including bound encoding/intersection utilities.

Changes:

  • Update Geometry/Geography type parameter defaults and equality/string semantics to match v3 expectations.
  • Add geospatial bounds encoding + intersection evaluation utilities and corresponding tests.
  • Enable round-tripping of geospatial WKB through Arrow (binary), Avro (bytes), and Parquet (geospatial logical types), plus metrics behavior updates.

Reviewed changes

Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/iceberg/type.h Default CRS/algorithm storage for geospatial primitive types.
src/iceberg/type.cc Updated geospatial constructors, equality, and string representations.
src/iceberg/test/visit_type_test.cc Update expected primitive type string representations.
src/iceberg/test/type_test.cc Extend geospatial type tests; add bounds/intersection test coverage.
src/iceberg/test/schema_json_test.cc Align schema JSON strings with v3; accept bare geospatial type names.
src/iceberg/test/parquet_test.cc Add Parquet round-trip test for WKB stored as binary.
src/iceberg/test/parquet_schema_test.cc Add Parquet geospatial logical type conversion/projection tests.
src/iceberg/test/parquet_metrics_test.cc Ensure geospatial metrics exclude bounds while preserving counts.
src/iceberg/test/avro_test.cc Add Avro writer test treating geospatial values as opaque bytes.
src/iceberg/test/avro_schema_test.cc Ensure geospatial types map/project as Avro bytes.
src/iceberg/test/arrow_test.cc Map geometry/geography to Arrow binary and adjust unsupported list.
src/iceberg/schema_internal.cc Enable Arrow schema conversion for geometry/geography as binary.
src/iceberg/parquet/parquet_writer.cc Switch Parquet writer to Iceberg-driven Parquet schema generation.
src/iceberg/parquet/parquet_schema_util.cc Implement Parquet schema generation + geospatial compatibility validation.
src/iceberg/parquet/parquet_schema_util_internal.h Expose Iceberg→Parquet schema conversion API.
src/iceberg/parquet/parquet_metrics.cc Skip bounds collection for geometry/geography metrics.
src/iceberg/meson.build Add geospatial sources/headers to Meson build/install.
src/iceberg/geospatial.h New public API for bounds/box encoding and intersection checks.
src/iceberg/geospatial.cc Implement geospatial bound/box encoding and intersection logic.
src/iceberg/CMakeLists.txt Add geospatial.cc to CMake sources.
src/iceberg/avro/avro_schema_util.cc Write geospatial types as Avro bytes nodes.
src/iceberg/avro/avro_direct_decoder.cc Decode geospatial values via the Avro-bytes path.
src/iceberg/avro/avro_data_util.cc Append geospatial values via the Avro-bytes path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/iceberg/geospatial.cc
@wgtmac

wgtmac commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

@zhjwpku @manuzhang PTAL :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants