Skip to content

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

Development

Successfully merging this pull request may close these issues.

5 participants