Skip to content

Conversation

@yyanyy
Copy link
Contributor

@yyanyy yyanyy commented Nov 4, 2020

Noticed this copy paste issue while updating Expressions. Verified that no code is actually using it, so updating it shouldn't impact any test.

@yyanyy yyanyy changed the title API: one liner fix in Expressions API: one line fix in Expressions Nov 4, 2020
@github-actions github-actions bot added the API label Nov 4, 2020
@RussellSpitzer
Copy link
Member

Should we add a test since there isn't one?

@yyanyy
Copy link
Contributor Author

yyanyy commented Nov 4, 2020

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 TestEvaluator, I'll add the versions with UnboundTerm parameter to this class too, unless people have better suggestions.

@RussellSpitzer
Copy link
Member

I mean it looks obviously correct to me :) I just hoped we could guard against future mistakes :)

@yyanyy yyanyy changed the title API: one line fix in Expressions API: one line fix in Expressions with tests Nov 4, 2020

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);
Copy link
Contributor

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!

This reverts commit b538644.
@rdblue rdblue merged commit 59fb458 into apache:master Nov 6, 2020
@rdblue
Copy link
Contributor

rdblue commented Nov 6, 2020

Merged. Thanks for the quick fix, @yyanyy!

@rdblue rdblue added this to the Java 0.10.0 Release milestone Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants