Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23054

Incorrect results of casting UserDefinedType to String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.1
    • 2.3.0
    • SQL
    • None

    Description

      >>> 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]|
      +-------------------------------------------+
      

      Attachments

        Activity

          People

            maropu Takeshi Yamamuro
            maropu Takeshi Yamamuro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: