[
https://issues.apache.org/jira/browse/SPARK-24659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16523578#comment-16523578
]
Apache Spark commented on SPARK-24659:
--------------------------------------
User 'rednaxelafx' has created a pull request for this issue:
https://github.com/apache/spark/pull/21643
> GenericArrayData.equals should respect element type differences
> ---------------------------------------------------------------
>
> Key: SPARK-24659
> URL: https://issues.apache.org/jira/browse/SPARK-24659
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.3.0, 2.3.1, 2.4.0
> Reporter: Kris Mok
> Priority: Major
>
> Right now, Spark SQL's {{GenericArrayData.equals}} doesn't always respect
> element type differences, due to a caveat in Scala's {{==}} operator.
> e.g. {{new GenericArrayData(Array[Int](123)).equals(new
> GenericArrayData(Array[Long](123L)))}} currently returns true. But that's
> against the semantics of Spark SQL's array type, where {{array<int>}} and
> {{array<long>}} are considered to be incompatible types and thus should never
> be equal.
> This ticket proposes to fix the implementation of {{GenericArrayData.equals}}
> so that it's more aligned to Spark SQL's array type semantics.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]