spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MahmoudHanafy (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-13886) ArrayType of BinaryType not supported in Row.equals method
Date Tue, 15 Mar 2016 04:28:33 GMT

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

MahmoudHanafy updated SPARK-13886:
----------------------------------
    Description: 
There are multiple types that are supoprted by Spark SQL, One of them is ArrayType(Seq) which
can be of any element type
So it can be BinaryType(Array\[Byte\])

In equals method in Row class, there is no handling for ArrayType of BinaryType.

So for example:
{code:xml}
val a = Row( Seq( Array(1.toByte) ) )
val b = Row( Seq( Array(1.toByte) ) )

a.equals(b) // this will return false
{code}

Also, this doesn't work for MapType of BinaryType.
{code:xml}
val a = Row( Map(1 -> Array(1.toByte) ) )
val b = Row( Map(1 -> Array(1.toByte) ) )

a.equals(b) // this will return false
{code}

I want to contribute by fixing this issue.

  was:
There are multiple types that are supoprted by Spark SQL
One of them is ArrayType(Seq) which can be of any element type
So it can be BinaryType(Array\[Byte\])

In equals method in Row class, there is no handling for
ArrayType of BinaryType.

So for example:
{code:xml}
val a = Row( Seq( Array(1.toByte) ) )
val b = Row( Seq( Array(1.toByte) ) )

a.equals(b) // this will return false
{code}

Also, this doesn't work for MapType of BinaryType.
{code:xml}
val a = Row( Map(1 -> Array(1.toByte) ) )
val b = Row( Map(1 -> Array(1.toByte) ) )

a.equals(b) // this will return false
{code}

I want to contribute by fixing this issue.


> ArrayType of BinaryType not supported in Row.equals method 
> -----------------------------------------------------------
>
>                 Key: SPARK-13886
>                 URL: https://issues.apache.org/jira/browse/SPARK-13886
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: MahmoudHanafy
>            Priority: Minor
>
> There are multiple types that are supoprted by Spark SQL, One of them is ArrayType(Seq)
which can be of any element type
> So it can be BinaryType(Array\[Byte\])
> In equals method in Row class, there is no handling for ArrayType of BinaryType.
> So for example:
> {code:xml}
> val a = Row( Seq( Array(1.toByte) ) )
> val b = Row( Seq( Array(1.toByte) ) )
> a.equals(b) // this will return false
> {code}
> Also, this doesn't work for MapType of BinaryType.
> {code:xml}
> val a = Row( Map(1 -> Array(1.toByte) ) )
> val b = Row( Map(1 -> Array(1.toByte) ) )
> a.equals(b) // this will return false
> {code}
> I want to contribute by fixing this issue.



--
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


Mime
View raw message