jun-he commented on a change in pull request #357: Add in and not in predicates
URL: https://github.com/apache/incubator-iceberg/pull/357#discussion_r315006857
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/expressions/Expressions.java
 ##########
 @@ -109,16 +111,46 @@ public static Expression not(Expression child) {
     return new UnboundPredicate<>(Expression.Operation.STARTS_WITH, ref(name), 
value);
   }
 
+  public static <T> UnboundPredicate<T> in(String name, T value, T... values) {
+    return predicate(Operation.IN, name,
+        Stream.concat(Stream.of(value), Stream.of(values))
+            .map(Literals::from).collect(Collectors.toSet()));
+  }
+
+  public static <T> UnboundPredicate<T> notIn(String name, T value, T... 
values) {
 
 Review comment:
   Done.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to