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 2018/01/12 08:10:00 UTC

[jira] [Assigned] (SPARK-23054) Incorrect results of casting UserDefinedType to String

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

Apache Spark reassigned SPARK-23054:
------------------------------------

    Assignee:     (was: Apache Spark)

> Incorrect results of casting UserDefinedType to String
> ------------------------------------------------------
>
>                 Key: SPARK-23054
>                 URL: https://issues.apache.org/jira/browse/SPARK-23054
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: Takeshi Yamamuro
>
> {code}
> >>> from pyspark.ml.classification import MultilayerPerceptronClassifier
> >>> from pyspark.ml.linalg import Vectors
> >>> df = spark.createDataFrame([(0.0, Vectors.dense([0.0, 0.0])), (1.0, Vectors.dense([0.0, 1.0]))], ["label", "features"])
> >>> df.selectExpr("CAST(features AS STRING)").show(truncate = False)
> +-------------------------------------------+
> |features                                   |
> +-------------------------------------------+
> |[6,1,0,0,2800000020,2,0,0,0]               |
> |[6,1,0,0,2800000020,2,0,0,3ff0000000000000]|
> +-------------------------------------------+
> {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