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


##########
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() {
+    Schema schema = new Schema(optional(0, "geometry_field", 
Types.GeometryType.of("EPSG:3857")));
+    List<FieldSchema> hiveSchema = HiveSchemaUtil.convert(schema);
+    assertThat(hiveSchema).containsExactly(new FieldSchema("geometry_field", 
"binary", null));
+  }
+
+  @Test
+  public void testGeographyTypeConvertToHiveSchema() {
+    Schema schema = new Schema(optional(0, "geography_field", 
Types.GeographyType.crs84()));
+    List<FieldSchema> hiveSchema = HiveSchemaUtil.convert(schema);
+    assertThat(hiveSchema).containsExactly(new FieldSchema("geography_field", 
"binary", null));
+  }
+
+  @Test
+  public void testGeographyTypeWithCustomCrsConvertToHiveSchema() {

Review Comment:
   I think the test below with both CRS and algorithm is enough.



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