huan233usc commented on code in PR #16765:
URL: https://github.com/apache/iceberg/pull/16765#discussion_r3477218420
##########
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:
Done now we just has `this.crs = crs`, the pervious impl for normalizing is
gone
--
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]