-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API: one line fix in Expressions with tests #1722
Conversation
Should we add a test since there isn't one? |
Thanks for the quick feedback! Looks like we have coverage for same method names that accepts string parameter in |
I mean it looks obviously correct to me :) I just hoped we could guard against future mistakes :) |
@@ -120,7 +120,7 @@ public static Expression not(Expression child) { | |||
} | |||
|
|||
public static <T> UnboundPredicate<T> notNull(UnboundTerm<T> expr) { | |||
return new UnboundPredicate<>(Expression.Operation.IS_NULL, expr); | |||
return new UnboundPredicate<>(Expression.Operation.NOT_NULL, expr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any uses of this factory method in Spark, Flink, or MR/Hive so luckily, I don't think that this affects engines. (And I would expect it to be caught quickly by Spark tests if we did.) I think that decreases the urgency of this fix, but it still affects API users.
Thanks for catching this, @yyanyy!
api/src/test/java/org/apache/iceberg/expressions/TestEvaluator.java
Outdated
Show resolved
Hide resolved
This reverts commit b538644.
Merged. Thanks for the quick fix, @yyanyy! |
Noticed this copy paste issue while updating
Expressions
. Verified that no code is actually using it, so updating it shouldn't impact any test.