uros-b commented on code in PR #17998:
URL: https://github.com/apache/iceberg/pull/17998#discussion_r3959343368


##########
orc/src/test/java/org/apache/iceberg/orc/TestExpressionToSearchArgument.java:
##########
@@ -221,6 +221,24 @@ public void testUnsupportedTypes() {
     assertThat(actual.toString()).isEqualTo(expected.toString());
   }
 
+  @Test
+  public void testVariantType() {
+    Schema schema =
+        new Schema(
+            required(1, "long", Types.LongType.get()),
+            optional(2, "variant", Types.VariantType.get()));
+
+    // predicates on other columns are still pushed down when the schema 
contains a variant column
+    Expression expr = equal("long", 1);
+    Expression boundFilter = Binder.bind(schema.asStruct(), expr, true);
+    SearchArgument expected =
+        SearchArgumentFactory.newBuilder().startAnd().equals("`long`", 
Type.LONG, 1L).end().build();
+
+    SearchArgument actual =
+        ExpressionToSearchArgument.convert(boundFilter, 
ORCSchemaUtil.convert(schema));
+    assertThat(actual.toString()).isEqualTo(expected.toString());
+  }
+

Review Comment:
   Thank you for checking Geo types as well!



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