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/19 03:42:00 UTC

[jira] [Resolved] (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 ]

Wenchen Fan resolved SPARK-23054.
---------------------------------
       Resolution: Fixed
         Assignee: Takeshi Yamamuro
    Fix Version/s: 2.3.0

> 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
>            Assignee: Takeshi Yamamuro
>            Priority: Major
>             Fix For: 2.3.0
>
>
> {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
(v7.6.3#76005)

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