Repository navigation
Conversation
There was a problem hiding this comment.
Verdict: 1 Medium · 1 Low
Looks solid overall — clean canonical-type definition with good parse/validation test coverage. One medium concern: the GEOMETRY/GEOGRAPHY → StructType mapping is wired into the live SEA schema path (StatementExecutionStatement.cs:712) with no serializing stream rewriting geospatial batches to that struct, so it relies on Reyden already emitting struct<srid,wkb> natively — worth confirming given the PR defers client representation to a later stack. One low note on TryGetTag throwing despite the Try* name. Nit (summary-only): the SRID regex -?\\d+ accepts a literal GEOMETRY(-1), which maps to the same tag as the ANY sentinel (srid = -1) — benign today since real SRIDs are non-negative, but the two become indistinguishable on round-trip.
lidavidm
left a comment
There was a problem hiding this comment.
This doesn't seem to use GeoArrow types? Shouldn't the driver use the standard types instead of defining its own keys?
775826c to
5cb1652
Compare
There was a problem hiding this comment.
Verdict: 2 Low
Looks good — a clean, well-tested new file defining the geospatial Arrow type contract; 2 low-severity notes only. The parsing, tag validation, SRID defaults (GEOMETRY=0 / GEOGRAPHY=4326 / ANY=-1), and GeoArrow metadata generation are internally consistent and match the Databricks geometry(0) base-name convention noted in the learning log. The notes concern the Try-prefixed method that throws and a missing test for the documented untagged-struct-returns-false path.
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
5cb1652 to
992b767
Compare
| /// Fixed positive SRIDs are advertised as opaque database SRIDs. Databricks | ||
| /// supports CRS authorities other than EPSG, and the manifest exposes only the | ||
| /// integer SRID. ANY has no column CRS because its SRID varies by row; those | ||
| /// rows carry EWKB instead. |
There was a problem hiding this comment.
For GEOMETRY(ANY) the comment says rows carry EWKB, but the field is still labeled geoarrow.wkb. My understanding is the GeoArrow spec expects ISO WKB here, so a strict reader might reject the EWKB SRID flag or silently drop the SRID. Can you confirm against the spec what readers (e.g. geoarrow-c, GDAL, geopandas) do with EWKB in a geoarrow.wkb column? If it isn't supported, options include ISO WKB plus a separate per-row SRID, or documenting ANY as a known deviation.
There was a problem hiding this comment.
GeoArrow recommends ISO WKB where possible, but allows consumers to accept EWKB. For a fixed SRID geometry, we use ISO WKB. But for GEOMETRY(ANY), ISO WKB cannot preserve each row’s different SRID, so EWKB is the only lossless single column representation.
geoarrow-c and geopandas accept EWKB, but GDAL rejects it (this is only for GEOGRAPHY(ANY))
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
What's Changed
struct<srid:int32,wkb:binary>.Binary, thegeoarrow.wkbextension name, and CRS/edge metadata.The Databricks tagged struct is an internal server transport contract. PR #700 converts it before exposing results to ADBC consumers.
Stack: 1 of 3.
Testing