Skip to content

Conversation

@arashn
Copy link

@arashn arashn commented Apr 23, 2016

What changes were proposed in this pull request?

In the doGenCode() function for the EqualNullSafe predicate, in determining whether the two operands are equal, check that the right operand is not null, in addition to checking the left operand. This is because if only one of the operands is null, then the two operands are guaranteed not to be equal. Therefore, in order to have a valid comparison using ==, both operands have to be non-null.

How was this patch tested?

This patch was tested using the example given in the JIRA for this issue.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@rxin
Copy link
Contributor

rxin commented Apr 23, 2016

can you add a test case?

rxin added a commit to rxin/spark that referenced this pull request Apr 30, 2016
…rection

[SPARK-14757][SQL] Corrected doGenCode() in EqualNullSafe predicate
@rxin
Copy link
Contributor

rxin commented Apr 30, 2016

I did it here: #12799

@asfgit asfgit closed this in 7945f9f Apr 30, 2016
asfgit pushed a commit that referenced this pull request Apr 30, 2016
This patch fixes a null handling bug in EqualNullSafe's code generation.

Updated unit test so they would fail without the fix.

Closes #12628.

Author: Reynold Xin <[email protected]>
Author: Arash Nabili <[email protected]>

Closes #12799 from rxin/equalnullsafe.
zzcclp pushed a commit to zzcclp/spark that referenced this pull request May 3, 2016
This patch fixes a null handling bug in EqualNullSafe's code generation.

Updated unit test so they would fail without the fix.

Closes apache#12628.

Author: Reynold Xin <[email protected]>
Author: Arash Nabili <[email protected]>

Closes apache#12799 from rxin/equalnullsafe.

(cherry picked from commit 10d513f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants