You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (JIRA)" <ji...@apache.org> on 2018/01/05 06:05:00 UTC

[jira] [Resolved] (SPARK-22825) Incorrect results of Casting Array to String

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

Wenchen Fan resolved SPARK-22825.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 2.3.0

Issue resolved by pull request 20024
[https://github.com/apache/spark/pull/20024]

> Incorrect results of Casting Array to String
> --------------------------------------------
>
>                 Key: SPARK-22825
>                 URL: https://issues.apache.org/jira/browse/SPARK-22825
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Xiao Li
>            Assignee: Takeshi Yamamuro
>             Fix For: 2.3.0
>
>
> {code}
> val df = spark.range(10).select('id.cast("integer")).agg(collect_list('id).as('ids))       df.write.saveAsTable("t")
> sql("SELECT cast(ids as String) FROM t").show(false)
> {code}
> The output is like
> {code}
> +------------------------------------------------------------------+
> |ids                                                               |
> +------------------------------------------------------------------+
> |org.apache.spark.sql.catalyst.expressions.UnsafeArrayData@8bc285df|
> +------------------------------------------------------------------+
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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