Skip to content

Test + docs cleanup for geometry/geography Arrow conversion #1233

Description

@laskoviymishka

Follow-up to #1138 — test-only and docs cleanup, no production behavior change:

  • epsg_4326_behavior has its assert.Equal args reversed (actual passed where expected goes), so a failure prints the diff backwards.
  • The wktToWKB test helper reuses the "parse WKT" error message on its wkb.Marshal branch — it should say "marshal WKB".
  • TestParquetGeoArrowExtensionMetadataRoundTrip uses unchecked type assertions that panic the goroutine on a mismatch instead of failing cleanly. Routing them through the comma-ok assertGeoArrowWKB pattern the PR already has would report regressions properly.
  • That same round-trip test only covers srid:4326 variants; the default-CRS geometry/geography columns — the most common real-world case — never go through the Parquet metadata path. Worth adding them.
  • Document the intentional contract at geoArrowMetadataToIcebergType: a geoarrow.wkb field with no edges (the PyIceberg/arrow-rs default) reads back as GeometryType, so a foreign geography(…, planar) column lands as geometry. A short pinning test would make that explicit. While there, the "planar geography from other clients" half of the VisitGeography comment is misleading — planar isn't a valid geography algorithm — so it can be trimmed.
  • The trickier readOnlyCases entries (e.g. geometry_srid_0_with_crs_type, geometry_epsg_4326_incorrect_type) could use a one-line note on what each one pins.
  • Minor: TestWKTToWKB mostly exercises go-geom's own behavior rather than iceberg-go logic, and geomList/geomSRID are duplicate declarations in the schema subtest.

Mostly self-contained, low-risk changes — good first issue territory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions