gszadovszky commented on code in PR #1370:
URL: https://github.com/apache/parquet-java/pull/1370#discussion_r1637690652


##########
parquet-column/src/main/java/org/apache/parquet/filter2/predicate/Operators.java:
##########
@@ -415,14 +420,18 @@ public int hashCode() {
     }
   }
 
-  private static class ContainsColumnPredicate<T extends Comparable<T>, U 
extends ColumnFilterPredicate<T>>
+  private static class ContainsColumnPredicate<T extends Comparable<T>, U 
extends SingleColumnFilterPredicate<T>>
       extends Contains<T> {
     private final U underlying;
 
     ContainsColumnPredicate(U underlying) {
       super(underlying.getColumn());
-      if (underlying.getValue() == null) {
-        throw new IllegalArgumentException("Contains predicate does not 
support null element value");
+      if ((underlying instanceof ColumnFilterPredicate && 
((ColumnFilterPredicate) underlying).getValue() == null)
+          || underlying instanceof SetColumnFilterPredicate
+              && ((SetColumnFilterPredicate) underlying)
+                  .getValues()
+                  .contains(null)) {

Review Comment:
   nit: I know it means the same logically, but I think it is more readable to 
wrap in a parenthesis since the `instanceof` and the related cast are tightly 
related. 



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