You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/08/28 21:06:45 UTC

[jira] [Resolved] (SPARK-10325) Public Row no longer overrides hashCode / violates hashCode + equals contract

     [ https://issues.apache.org/jira/browse/SPARK-10325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Armbrust resolved SPARK-10325.
--------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.5.0

Issue resolved by pull request 8500
[https://github.com/apache/spark/pull/8500]

> Public Row no longer overrides hashCode / violates hashCode + equals contract
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-10325
>                 URL: https://issues.apache.org/jira/browse/SPARK-10325
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.5.0
>            Reporter: Josh Rosen
>            Priority: Critical
>             Fix For: 1.5.0
>
>
> It appears that the public {{Row}}'s hashCode is no longer overridden as of Spark 1.5.0:
> {code}
> val x = Row("Hello")
> val y = Row("Hello")
> println(x == y)
> println(x.hashCode)
> println(y.hashCode)
> {code}
> outputs
> {code}
> true
> 1032103993
> 1346393532
> {code}
> This violates the hashCode/equals contract.
> I discovered this because it broke tests in the {{spark-avro}} library.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org