Skip to content
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

[SPARK-24846][SQL] Made hashCode ExprId independent of jvmId #21806

Closed
wants to merge 1 commit into from

Conversation

gvr
Copy link
Contributor

@gvr gvr commented Jul 18, 2018

What changes were proposed in this pull request?

Made ExprId hashCode independent of jvmId to make canonicalization independent of JVM, by overriding hashCode (and necessarily also equality) to depend on id only

How was this patch tested?

Created a unit test ExprIdSuite
Ran all unit tests of sql/catalyst

@hvanhovell
Copy link
Contributor

ok to test

@hvanhovell
Copy link
Contributor

@gvr can you clean-up the description somewhat? It currently also has part of the template in it.

@hvanhovell
Copy link
Contributor

otherwise, LGTM pending jenkins

@gvr
Copy link
Contributor Author

gvr commented Jul 18, 2018

Updated description, thanks @hvanhovell

@SparkQA
Copy link

SparkQA commented Jul 18, 2018

Test build #93240 has finished for PR 21806 at commit 68d6f19.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class ExprId(id: Long, jvmId: UUID)

@viirya
Copy link
Member

viirya commented Jul 18, 2018

The change looks fine. However I'm wondering that have we had chance to compare hash code between expr ids from different jvms?

@hvanhovell
Copy link
Contributor

@viirya this current change is only useful when you compare canonicalized plans created on different JVMs. This has come up when we tried to detect changes in plans over spark versions (plan stability) and when people are writing to caches used by multiple clusters.

@viirya
Copy link
Member

viirya commented Jul 18, 2018

@hvanhovell Got it. Thanks for your explanation. LGTM.

@HyukjinKwon
Copy link
Member

LGTM too

@hvanhovell
Copy link
Contributor

Merging to master. Thanks!

@asfgit asfgit closed this in 67e108d Jul 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants