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

Incorrect results of casting UserDefinedType to String

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.3.0
    • Component/s: SQL
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: