You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/12/01 04:41:19 UTC

[GitHub] [incubator-iceberg] jun-he commented on a change in pull request #600: Implement in and notIn in multiple visitors

jun-he commented on a change in pull request #600: Implement in and notIn in multiple visitors
URL: https://github.com/apache/incubator-iceberg/pull/600#discussion_r352319545
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java
 ##########
 @@ -269,11 +269,16 @@ public Boolean or(Boolean leftResult, Boolean rightResult) {
 
     @Override
     public <T> Boolean in(BoundReference<T> ref, Set<T> literalSet) {
-      return ROWS_MIGHT_MATCH;
+      // in(col, {X, Y}) => eq(col, x) OR eq(col, x)
+      if (literalSet.stream().anyMatch(v -> eq(ref, toLiteral(v)))) {
 
 Review comment:
   Thanks for the comments and update the code accordingly.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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