Skip to content

feat(results): support native geospatial Arrow values - #365

Merged
cathleeny merged 1 commit into
mainfrom
feat/geospatial-arrow-binary
Sep 29, 2026
Merged

cathleeny merged 1 commit into
mainfrom
feat/geospatial-arrow-binary

Conversation

@cathleeny

@cathleeny cathleeny commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • reconstruct logical GEOMETRY and GEOGRAPHY leaves from the structured SEA manifest as canonical Arrow struct<srid,wkb> values
  • reconcile untagged non-empty Reyden physical Arrow attachments with that logical schema without copying child buffers
  • accept Reyden's nullable physical srid / wkb child fields, then normalize the public schema to Reyder's canonical non-null tagged fields
  • preserve family and type-level SRID tags recursively through arrays, maps, and structs
  • make non-empty inline, CloudFetch, and empty-result schemas consistent

Stack

This is the binary Arrow foundation. #360 adds optional local EWKT rendering and the typed representation choice; #361 exposes that choice through Python, Node.js, and the C ABI.

Testing

  • cargo fmt --all -- --check
  • denied-warning Clippy with both native TLS and rustls
  • cargo test --workspace --locked on this layer and every later stack layer
  • unit and WireMock coverage with real Arrow IPC, including Reyden's nullable physical child fields
  • inline, CloudFetch, nested, null, empty-geometry, fixed-SRID, and ANY-SRID coverage
  • live E2E on the complete stack: inline string/binary; 1M-row CloudFetch string/binary; geometry and geography; fixed and ANY SRID; nulls; empty geometry; and nested arrays

Live empty geospatial result-set queries currently fail in Reyden with XXR06 Partition 0 already finished. Non-geospatial empty results pass live, and geospatial empty-result schema handling is covered hermetically.

@oss-reviewer-bot oss-reviewer-bot Bot 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.

Verdict: 1 Low

Looks good — solid, well-tested implementation with one minor Low note. The manifest-as-authority design correctly avoids misidentifying coincidental struct<srid,wkb> user structs (manifest reconstructs a plain STRUCT with nullable children, so the tagged non-null shape only arises for genuine GEOMETRY/GEOGRAPHY columns), buffers are reused rather than copied, and geo-before-JSON ordering with is_top_level_geo gating is correct. The only observation is a silent SRID-parse fallback (F1).

Comment thread src/metadata/type_mapping.rs Resolved

@oss-reviewer-bot oss-reviewer-bot Bot 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.

Verdict: 1 Medium

Solid, well-tested change — logical/physical schema split, the recursive geo reconciliation (buffers shared, tags attached from the authoritative manifest), and the post-processor overlap handling (geo-before-JSON) all look correct, and coverage (unit + wiremock across inline/CloudFetch/empty/legacy/nested) is thorough. One medium concern: the empty-result paths now fatally propagate manifest.arrow_schema decode/column-count failures where the streaming path tolerates the same failure, a behavior change from the previously-robust logical-schema fallback.

Comment thread src/reader/mod.rs Resolved
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>

@oss-reviewer-bot oss-reviewer-bot Bot 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.

Verdict: 1 Low

Looks good — solid, well-tested implementation of native geospatial Arrow reconciliation. The logical-vs-physical schema split (extract_logical_schema_from_manifest / extract_physical_schema_from_manifest), buffer-preserving rewrite, geo-before-JSON ordering, and the new manifest.arrow_schema field are all coherent and covered by unit + wiremock tests (inline, CloudFetch, empty, legacy-text, nested, malformed). One low-severity note on native_geo_tag over-eagerly erroring on ambiguous tags. Nit: extract_logical_schema_from_manifest is now reconstructed once per manifest-bearing statement in ResultPostProcessor::new even for non-geo queries — negligible (per-statement, not per-batch) but avoidable if you gate it on the schema actually containing a GEOMETRY/GEOGRAPHY column.

Comment thread src/reader/post_processor/geospatial.rs Resolved
@cathleeny
cathleeny added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 906c32e Sep 29, 2026
24 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 1c1f77a6 Deployed Sep 29, 2026 by oss-reviewer-bot[bot] via followup #1746
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