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

TransformingEncoder should work with primitive types

    XMLWordPrintableJSON

Details

    Description

      Currently using a primitive type on as input to a transforming encoder will fail with an exception like

      ```
      Cause: java.lang.ClassCastException: class org.apache.spark.sql.catalyst.expressions.MutableAny cannot be cast to class org.apache.spark.sql.catalyst.expressions.MutableLong (org.apache.spark.sql.catalyst.expressions.MutableAny and org.apache.spark.sql.catalyst.expressions.MutableLong are in unnamed module of loader 'app')
      ```

      Attachments

        Activity

          People

            eejbyfeldt Emil Ejbyfeldt
            eejbyfeldt Emil Ejbyfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: