rdblue commented on code in PR #12346:
URL: https://github.com/apache/iceberg/pull/12346#discussion_r2008303696


##########
api/src/main/java/org/apache/iceberg/types/Types.java:
##########
@@ -58,9 +58,16 @@ private Types() {}
           .put(BinaryType.get().toString(), BinaryType.get())
           .put(UnknownType.get().toString(), UnknownType.get())
           .put(VariantType.get().toString(), VariantType.get())
+          .put(GeometryType.crs84().toString(), GeometryType.crs84())
+          .put(GeographyType.crs84().toString(), GeographyType.crs84())
           .buildOrThrow();
 
   private static final Pattern FIXED = 
Pattern.compile("fixed\\[\\s*(\\d+)\\s*\\]");
+  private static final Pattern GEOMETRY_PARAMETERS =
+      Pattern.compile("geometry\\s*(?:\\(\\s*([^,]+?)\\s*\\))?", 
Pattern.CASE_INSENSITIVE);
+  private static final Pattern GEOGRAPHY_PARAMETERS =
+      Pattern.compile(
+          "geography\\s*(?:\\(\\s*([^,]+)\\s*(?:,\\s*(\\w*)\\s*)?\\))?", 
Pattern.CASE_INSENSITIVE);

Review Comment:
   This doesn't use non-greedy matching for the CRS, which means that the 
`trim` call below is required. I think it would be better to use non-greedy 
matching using `([^,]+?)` and remove the call to `trim`.



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