[ 
https://issues.apache.org/jira/browse/SPARK-13886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15197901#comment-15197901
 ] 

holdenk commented on SPARK-13886:
---------------------------------

For q1: Looking at MapData.scala I don't see any restriction on the type 
expressed and the documentation says "
MapType(keyType, valueType, valueContainsNull): Represents values comprising a 
set of key-value pairs. The data type of keys are described by keyType and the 
data type of values are described by valueType. For a MapType value, keys are 
not allowed to have null values. valueContainsNull is used to indicate if 
values of a MapType value can have null values." so I think we should either 
support binary key types or update the documentation.

Maybe [~marmbrus] has an idea on this?

> 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}
> Question1: Can the key in MapType be of BinaryType ?
> Question2: Isn't there another way to handle BinaryType by using scala type 
> instead of Array ?
> I want to contribute by fixing this issue.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to