Repository navigation
feat(bindings): expose geospatial result representation - #361
Conversation
e3700a7 to
8548d4c
Compare
There was a problem hiding this comment.
Verdict: 2 Low
Clean, well-covered change. The default flip from String to Binary geospatial representation is threaded consistently through every layer (kernel unwrap_or_default, napi unwrap_or(true), pyo3 signature default true, C ABI None → kernel default) with matching unit, wiremock, and C-smoke coverage, and the wiremock tests confirm the setting stays client-side and is never forwarded to SEA. Two minor API-surface notes inline (cross-binding naming spelling, and a boolean name that reads as a feature toggle rather than a representation choice); both are documented and non-blocking.
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested bindings exposure. The kernel default flip from EWKT String to native SRID+WKB Binary is wired consistently through SessionConfig → PostProcessOptions → reader, documented in the changelog, and covered end-to-end by updated wiremock tests (including the client-side-only assertions that nothing reaches SEA). One Low: the option is spelled enable_geospatial_support in Python but enableGeoSpatialSupport in Node — a cross-binding naming divergence worth aligning.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — one low cross-binding naming inconsistency (enableGeoSpatialSupport in Node vs enable_geospatial_support elsewhere). The default flip to Binary and the new binding/C-ABI setters are consistent and well-covered by unit, wiremock, and C smoke tests; the legacy-text-under-Binary rejection path is tested. Note the default change is a behavior shift, but since the whole geospatial surface is unreleased (NEXT_CHANGELOG / stacked on #360), there is no released behavior to break.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested extension that exposes the geospatial representation toggle through all three bindings and flips the default to native SRID+WKB. The new text→native conversion path (text_to_native/ewkt_values_to_native/split_ewkt/normalize_multipoint_empty_members) is carefully bounds-checked (no slicing panics), the .expect("logical_tag implies a logical type") is provably safe (logical_tag is Some only when logical is Some), malformed input is surfaced as DataLoss without echoing values, and the EnableGeoSpatialSupport naming/semantics match the JDBC reference. Only one low-severity observation about per-row SRID fallback for unprefixed text; no blocking issues.
|
Could we clarify which option contract is intended? The summary says |
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Medium · 1 Low
Solid, well-tested change — the text↔native geospatial conversion, validity propagation, and client-side-only guarantee all hold up and have good hermetic coverage. Two non-blocking notes: a behavioral-risk flag on flipping the default to Binary (medium) and a cross-binding naming inconsistency (low).
aakash-saravanan-db
left a comment
There was a problem hiding this comment.
Can we link the upstream Reyden issue for XXR06 Partition 0 already finished and identify the live zero-row regression test required to close it?
Both representation modes request the same server-side Arrow execution, so disabling this option cannot bypass that failure. Hermetic empty-schema coverage verifies the kernel behavior but does not establish that the end-to-end zero-row path works.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a clean, well-tested binding/representation change (default geospatial representation flips to native SRID+WKB; standard-warehouse WKT/EWKT text is now parsed into the tagged struct in binary mode). The text↔native conversion, container-validity masking, slicing, and malformed-input redaction are all covered by thorough unit and wiremock tests; the three binding surfaces (PyO3/napi/C ABI) map the flag consistently and all keep the choice client-side (verified by the create-session wiremock assertions).
One low-severity note inline on the broadened NOT NULL nullability in parse_struct. Nit (not inlined): the user-facing option name is inconsistent across bindings — Python enable_geospatial_support and C ..._enable_geospatial_support use "geospatial" while Node enableGeoSpatialSupport capitalizes "GeoSpatial"; intentional to mirror the server conf key EnableGeoSpatialSupport, but may surprise cross-language users.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good overall — the text↔native geospatial conversion, container-validity masking, and the default flip to Binary are consistently wired across the kernel, C ABI, PyO3, and napi, with strong unit/wiremock coverage. One low-severity note: a stated "never echo result contents in errors" invariant has a gap on the WKT-parser error path (the no-echo test doesn't exercise it).
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a thorough, heavily-tested change that exposes the geospatial result representation through all three bindings and flips the kernel default to native SRID+WKB. The new text→native conversion logic (validate_wkt_boundary, split_ewkt, normalize_multipoint_empty_members, container validity masking) is well covered by the added unit/wiremock tests, the wkt dependency's license is already allow-listed in deny.toml, and the default-flip is wired consistently (Python =true, Node unwrap_or(true), C-ABI None→kernel default) with matching changelog entries. Note the default change is a deliberate behavioral break for existing binding users (EWKT strings → struct), documented in the changelogs. Only one minor cross-binding naming-consistency nit, inline.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Low
Looks good — a well-structured, heavily-tested change that flips the default geospatial representation to native SRID+WKB and adds standard-warehouse WKT/EWKT→struct conversion across Python/Node/C bindings. The default flip and binding surface are intentional and documented in the changelogs/docs; the client-side-only guarantee is verified by wiremock tests. One low note: parse_struct's new NOT NULL handling now applies to all struct fields, slightly tightening nullability for non-geo structs too. No blocking issues.
Signed-off-by: cat23123 <58714163+cat23123@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: 1 Nit
Looks good — a clean, well-tested feature PR exposing the geospatial result representation across Python, Node, and the C ABI, plus the kernel default flip (String → Binary) and standard-warehouse WKT/EWKT → native SRID+WKB conversion. The post-processor changes (text_to_native, ancestor-validity propagation, EWKT boundary validation, MULTIPOINT-empty normalization, non-value-echoing error paths) are carefully guarded and backed by extensive hermetic coverage (nested/sliced/null-masking, both modes, every OGC family). The default-behavior change is intentional and documented in all three changelogs. Only one cosmetic naming-consistency nit.
Other findings
- ⚪ Nit — Cross-binding naming is inconsistent: Node.js exposes
enableGeoSpatialSupport(camel-cased "GeoSpatial" to match the server confEnableGeoSpatialSupport), while Python usesenable_geospatial_supportand the C ABI useskernel_session_config_set_enable_geospatial_support(both lowercase "geospatial"). The divergence is intentional given each ecosystem's casing convention and the SEA conf spelling, so this is only a cosmetic note — users consulting docs across bindings may be briefly surprised. No change required unless you want a consistent token stem.
Summary
trueto canonical Arrowstruct<srid,wkb>binary values andfalseto EWKT Arrow UTF-8 valuesThis is stacked on #360, which adds the typed Rust kernel option and local EWKT conversion. #365 provides the native binary Arrow foundation and schema reconciliation.
Testing
cargo fmt --all -- --checkcargo test --workspace --lockedon every stack layerLive 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.