szehon-ho commented on code in PR #5113:
URL: https://github.com/apache/iceberg/pull/5113#discussion_r906214301
##########
api/src/test/java/org/apache/iceberg/expressions/TestPredicateBinding.java:
##########
@@ -605,4 +605,161 @@ public void
testNotInPredicateBindingConversionToExpression() {
Expression expr = unbound.bind(struct);
Assert.assertEquals("Should change NOT_IN to alwaysTrue expression",
Expressions.alwaysTrue(), expr);
}
+
+ @Test
+ public void testStructFields() {
Review Comment:
Sorry to make more work, but do you think we can split these two big test
methods ? I feel there's a lot of independent tests here.
##########
api/src/main/java/org/apache/iceberg/expressions/UnboundPredicate.java:
##########
@@ -109,6 +109,9 @@ public Expression bind(StructType struct, boolean
caseSensitive) {
return bindUnaryOperation(bound);
}
+ Preconditions.checkState(!bound.type().isNestedType(),
+ "Non-Unary Predicate is not supported for top column of nested types");
Review Comment:
Sentence is a bit complex, maybe 'Non-unary predicate is not supported for
complex types'? Or even 'Only unary predicates are supported for complex
types'.
--
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]