rdblue commented on a change in pull request #294: Add multi AND helper method
URL: https://github.com/apache/incubator-iceberg/pull/294#discussion_r304683810
##########
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:
I don't think that this is a binary compatible change. Instead, could you
leave `and(left, right)` and add a new method, `and(Expression,
Expression...)`? That can use `and` instead of `createAnd`.
----------------------------------------------------------------
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]