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

Apache Spark commented on SPARK-23054:
--------------------------------------

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

> 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
>            Priority: Major
>
> {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-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to