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/07/18 09:52:50 UTC

[GitHub] [incubator-iceberg] arina-ielchiieva commented on a change in pull request #294: Add multi AND helper method

arina-ielchiieva commented on a change in pull request #294: Add multi AND helper method
URL: https://github.com/apache/incubator-iceberg/pull/294#discussion_r304832332
 
 

 ##########
 File path: api/src/main/java/org/apache/iceberg/expressions/Expressions.java
 ##########
 @@ -29,17 +30,9 @@
   private Expressions() {
   }
 
-  public static Expression and(Expression left, Expression right) {
-    Preconditions.checkNotNull(left, "Left expression cannot be null.");
-    Preconditions.checkNotNull(right, "Right expression cannot be null.");
-    if (left == alwaysFalse() || right == alwaysFalse()) {
-      return alwaysFalse();
-    } else if (left == alwaysTrue()) {
-      return right;
-    } else if (right == alwaysTrue()) {
-      return left;
-    }
-    return new And(left, right);
+  public static Expression and(Expression left, Expression right, Expression... expressions) {
 
 Review comment:
   Good point, I'll make the change.

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