You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2017/02/02 10:45:51 UTC

[jira] [Commented] (SPARK-19435) Type coercion between ArrayTypes

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

Apache Spark commented on SPARK-19435:
--------------------------------------

User 'HyukjinKwon' has created a pull request for this issue:
https://github.com/apache/spark/pull/16777

> Type coercion between ArrayTypes
> --------------------------------
>
>                 Key: SPARK-19435
>                 URL: https://issues.apache.org/jira/browse/SPARK-19435
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 2.2.0
>            Reporter: Hyukjin Kwon
>
> It seems currently we don't allow type coercion between arrays. We now implicitly cast it in SPARK-18624
> So, the below codes are not working now.
> {code}
> Seq(Array(1)).toDF("a").selectExpr("greatest(a, array(1D))")
> Seq(Array(1)).toDF("a").selectExpr("least(a, array(1D))")
> sql("SELECT * FROM values (array(0)), (array(1D)) as data(a)")
> Seq(Array(1)).toDF("a").union(Seq(Array(1D)).toDF("b"))
> sql("SELECT IF(1=1, array(1), array(1D))")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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