C-Loftus commented on code in PR #2125:
URL: https://github.com/apache/iceberg-go/pull/2125#discussion_r4214144549
##########
table/arrow_utils_test.go:
##########
@@ -3355,31 +3358,37 @@ func TestGeoTypeParquetRoundTrip(t *testing.T) {
name string
icebergType iceberg.Type
geoarrowMetaJSON string
+ parquetLogical schema.LogicalType
}{
{
name: "geometry_default_crs",
icebergType: iceberg.GeometryType{},
geoarrowMetaJSON:
`{"crs":"OGC:CRS84","crs_type":"authority_code"}`,
+ parquetLogical: schema.GeometryLogicalType{},
},
{
name: "geometry_srid_0",
icebergType: geomSRID0,
geoarrowMetaJSON: `{"crs":"0","crs_type":"srid"}`,
+ parquetLogical: schema.GeometryLogicalType{Crs:
"srid:0"},
},
{
name: "geography_srid_0",
icebergType: geogSRID0,
geoarrowMetaJSON:
`{"crs":"0","crs_type":"srid","edges":"spherical"}`,
+ parquetLogical: schema.GeographyLogicalType{Crs:
"srid:0", Algorithm: schema.GeographyEdgeSpherical},
Review Comment:
Added a default-geography case (geography_default: no CRS, SPHERICAL edges).
also for context I cross-checked with DuckDB 1.5.4. For the default CRS,
both DuckDB and we omit crs. For explicit CRSs, DuckDB writes inline PROJJSON
rather than srid:<id> or authority codes. DuckDB reads our EPSG:3857 files with
the CRS intact, and reads our srid:<id> files as geometry without the CRS.
Per the Parquet geospatial spec, OGC:CRS84 is the default (omitted), and
srid:<identifier> is a suggested CRS form, with srid:0 as the spec's own
example. DuckDB writes inline PROJJSON instead, which the spec also allows, so
the two outputs differ in form but both comply to my understanding
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]