-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-8658] [SQL] AttributeReference's equals method compares all the members #9216
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
Conversation
|
Can you add a regression test? |
|
Actually, maybe we don't need one. |
|
Jenkins, this is ok to test. |
|
Test build #44134 has finished for PR 9216 at commit
|
|
My code change exposed a new defect: Without my changes, in the first ROLLUP test case, both SQL query results or Dataframe results return the following result: However, the expected results should be like I need more time to find the root cause why rollup and cube do not work. The current test cases in HiveDataFrameAnalyticsSuite hide the errors because the results of both SQL and DataFrame are wrong, although the results are the same. Thanks, Xiao Li |
|
Hi @gatorsmile , thanks for working on it! |
|
Hi, @cloud-fan Sure. Will do. I am trying to see if I can easily fix it. Anyway, I will open a JIRA tonight. Thanks, Xiao Li |
|
The JIRA is opened: |
|
@JoshRosen @cloud-fan |
|
Test build #45901 has finished for PR 9216 at commit
|
|
Test build #45919 has finished for PR 9216 at commit
|
|
Test build #45932 has finished for PR 9216 at commit
|
|
Thanks, I'm going to merge this to master and 1.6. |
… members This fix is to change the equals method to check all of the specified fields for equality of AttributeReference. Author: gatorsmile <[email protected]> Closes #9216 from gatorsmile/namedExpressEqual. (cherry picked from commit 75ee12f) Signed-off-by: Michael Armbrust <[email protected]>
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.
@gatorsmile , can you send a follow-up PR to also update the hashCode according to this? thanks!
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.
sure, will do it tonight.
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.
Good catch!
…res all the members Based on the comment of cloud-fan in #9216, update the AttributeReference's hashCode function by including the hashCode of the other attributes including name, nullable and qualifiers. Here, I am not 100% sure if we should include name in the hashCode calculation, since the original hashCode calculation does not include it. marmbrus cloud-fan Please review if the changes are good. Author: gatorsmile <[email protected]> Closes #9761 from gatorsmile/hashCodeNamedExpression. (cherry picked from commit 0158ff7) Signed-off-by: Michael Armbrust <[email protected]>
…res all the members Based on the comment of cloud-fan in #9216, update the AttributeReference's hashCode function by including the hashCode of the other attributes including name, nullable and qualifiers. Here, I am not 100% sure if we should include name in the hashCode calculation, since the original hashCode calculation does not include it. marmbrus cloud-fan Please review if the changes are good. Author: gatorsmile <[email protected]> Closes #9761 from gatorsmile/hashCodeNamedExpression.
…res all the members Based on the comment of cloud-fan in apache/spark#9216, update the AttributeReference's hashCode function by including the hashCode of the other attributes including name, nullable and qualifiers. Here, I am not 100% sure if we should include name in the hashCode calculation, since the original hashCode calculation does not include it. marmbrus cloud-fan Please review if the changes are good. Author: gatorsmile <[email protected]> Closes #9761 from gatorsmile/hashCodeNamedExpression.
This fix is to change the equals method to check all of the specified fields for equality of AttributeReference.