Kris Mok created SPARK-24659:
--------------------------------

             Summary: 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.1, 2.3.0, 2.4.0
            Reporter: Kris Mok


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]

Reply via email to