szehon-ho commented on code in PR #16765:
URL: https://github.com/apache/iceberg/pull/16765#discussion_r3476481966


##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -584,12 +585,13 @@ public static GeometryType of(String crs) {
     private final String crs;
 
     private GeometryType() {
-      crs = null;
+      crs = DEFAULT_CRS;
     }
 
     private GeometryType(String crs) {
       Preconditions.checkArgument(crs == null || !crs.isEmpty(), "Invalid CRS: 
(empty string)");
-      this.crs = DEFAULT_CRS.equalsIgnoreCase(crs) ? null : crs;
+      // canonicalize the default CRS (any casing or omitted) so the stored 
field is comparable
+      this.crs = crs == null || DEFAULT_CRS.equalsIgnoreCase(crs) ? 
DEFAULT_CRS : crs;

Review Comment:
   discussed offline, lets clean this part up :) and also make sure we are case 
preserving if the user provides some default that is not upper case



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