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


##########
core/src/test/java/org/apache/iceberg/data/DataTest.java:
##########
@@ -129,28 +135,37 @@ protected boolean supportsVariant() {
     return false;
   }
 
+  protected boolean supportsGeospatial() {
+    return false;
+  }
+
   @ParameterizedTest
   @FieldSource("SIMPLE_TYPES")
   public void testTypeSchema(Type type) throws IOException {
-    Assumptions.assumeThat(
-            supportsUnknown()
-                || TypeUtil.find(type, t -> t.typeId() == Type.TypeID.UNKNOWN) 
== null)
-        .as("unknown is not yet implemented")
-        .isTrue();
-    Assumptions.assumeThat(
-            supportsTimestampNanos()
-                || TypeUtil.find(type, t -> t.typeId() == 
Type.TypeID.TIMESTAMP_NANO) == null)
-        .as("timestamp_ns is not yet implemented")
-        .isTrue();
-    Assumptions.assumeThat(
-            supportsVariant()
-                || TypeUtil.find(type, t -> t.typeId() == Type.TypeID.VARIANT) 
== null)
-        .as("variant is not yet implemented")
-        .isTrue();
+    if (!supportsUnknown()) {
+      assumeNoUnsupportedType(type, Type.TypeID.UNKNOWN, "unknown");
+    }
+    if (!supportsTimestampNanos()) {
+      assumeNoUnsupportedType(type, Type.TypeID.TIMESTAMP_NANO, 
"timestamp_ns");
+    }
+    if (!supportsVariant()) {
+      assumeNoUnsupportedType(type, Type.TypeID.VARIANT, "variant");
+    }
+    if (!supportsGeospatial()) {
+      assumeNoUnsupportedType(type, Type.TypeID.GEOMETRY, "geometry");
+      assumeNoUnsupportedType(type, Type.TypeID.GEOGRAPHY, "geography");
+    }
 
     writeAndValidate(new Schema(required(1, "id", LongType.get()), optional(2, 
"test_type", type)));
   }
 
+  private static void assumeNoUnsupportedType(

Review Comment:
   I'd rather not refactor this out since it is a method added with just one 
statement.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to