happydave1 commented on code in PR #1138:
URL: https://github.com/apache/iceberg-go/pull/1138#discussion_r3382943742


##########
table/arrow_utils.go:
##########
@@ -1828,3 +1844,72 @@ func positionDeleteRecordsToDataFilesDV(ctx 
context.Context, rootLocation string
                }
        }
 }
+
+func geoArrowCRSToIcebergCRS(meta geoarrow.Metadata) (string, error) {
+       if len(meta.CRS) == 0 && meta.CRSType == "" {
+               return "srid:0", nil
+       }
+
+       var crs string
+       if len(meta.CRS) > 0 {
+               if err := json.Unmarshal(meta.CRS, &crs); err != nil {
+                       return "", fmt.Errorf("invalid geoarrow CRS metadata: 
%w", err)
+               }
+       }
+
+       if crs == "OGC:CRS84" || crs == "EPSG:4326" {

Review Comment:
   I believe that a round trip regression test is definitely in order for this 
behavior. 
   
   @paleolimbot, is the asymmetric behavior here expected or should we collapse 
`"EPSG:4326"` at the write level too? (i.e. add a conditional in 
`icebergCRSToGeoArrowMetadata`)



-- 
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]

Reply via email to