gaborkaszab commented on code in PR #17112:
URL: https://github.com/apache/iceberg/pull/17112#discussion_r3726772459


##########
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveSchemaUtil.java:
##########
@@ -212,6 +213,44 @@ public void testVariantTypeConvertToHiveSchema() {
     assertThat(hiveSchema).containsExactly(new FieldSchema("variant_field", 
"unknown", null));
   }
 
+  @Test
+  public void testGeometryTypeConvertToHiveSchema() {
+    Schema schema = new Schema(optional(0, "geometry_field", 
Types.GeometryType.crs84()));
+    List<FieldSchema> hiveSchema = HiveSchemaUtil.convert(schema);
+    assertThat(hiveSchema).containsExactly(new FieldSchema("geometry_field", 
"binary", null));
+  }
+
+  @Test
+  public void testGeometryTypeWithCustomCrsConvertToHiveSchema() {

Review Comment:
   I'd prefer merge these 2 and don't speculate on any future changes in HMS at 
this point



##########
hive-metastore/src/main/java/org/apache/iceberg/hive/HiveSchemaUtil.java:
##########
@@ -166,6 +166,8 @@ private static String convertToTypeString(Type type) {
         return "timestamp";
       case FIXED:
       case BINARY:
+      case GEOMETRY:

Review Comment:
   "I would prefer binary because" I'm curious about the "because" part but 
that seems missing :) If we don't have a good reason to go with `binary` I'd 
prefer to keep consistency with other similar types from this aspect, as 
`variant` mapping to `unknown`.



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