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

 ##########
 File path: api/src/main/java/org/apache/iceberg/expressions/Evaluator.java
 ##########
 @@ -134,13 +135,13 @@ public Boolean or(Boolean leftResult, Boolean 
rightResult) {
     }
 
     @Override
-    public <T> Boolean in(BoundReference<T> ref, Literal<T> lit) {
-      throw new UnsupportedOperationException("In is not supported yet");
+    public <T> Boolean in(BoundReference<T> ref, Set<Literal<T>> lits) {
+      return lits.contains(Literals.from(ref.get(struct)));
 
 Review comment:
   Be careful with strings. You'll probably need to use 
`Set<CharSequenceWrapper>` so that all `CharSequence` instances are compared 
correctly.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to