-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-6364] [MLlib] Implement equals and hashcode for Matrix #5081
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
|
cc @mengxr . Please review. |
|
|
Test build #28781 has finished for PR 5081 at commit
|
|
Test build #28783 has finished for PR 5081 at commit
|
|
Also, I'm not sure what the failed tests are about. |
|
Test build #28785 has finished for PR 5081 at commit
|
|
What's the use case for comparing matrices for equality? I think it's rarer than for vectors. Is it just for testing, mostly? |
|
The hashCode implementation was taken from Effective Java: http://stackoverflow.com/questions/10915309/need-explanation-for-hashcode-example-in-effective-java-textbook
@srowen It may help if we implement hashCode and content equals for both vectors and matrices. It is mostly used for testing. |
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.
Hash numRows and numCols separately.
|
@srowen There are two approaches:
Which do you prefer? |
|
I'm starting to think we should just test if |
|
Okay, let's keep this PR open and could you update the MatrixUDT PR to use |
|
Done already 👍 |
|
Test build #31050 has started for PR 5081 at commit
|
|
@mengxr @MechCoder what is the status on this PR? It seems to fairly outdated at this point. Should we move forward or close it? |
|
Please do not. We just had a discussion about this yesterday. |
|
Test build #35250 has finished for PR 5081 at commit
|
|
Test build #35299 has finished for PR 5081 at commit
|
|
Test build #35303 has finished for PR 5081 at commit
|
|
There seems to be a unrelated whitespace error in L30 in |
|
Yep, we're fixing it now via a hotfix. |
|
should be fixed now. retest this please |
|
Test build #35305 has finished for PR 5081 at commit
|
Implementing methods equals hashcode and equals for Matrix