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

Spark ExpressionEncoder should support java enum type in scala

    XMLWordPrintableJSON

Details

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

    Description

      In SPARK-21255, spark upstream adds support for creating encoders for java enum types, but the support is only added to Java API(for enum working within Java Beans). Since the java enum can come from third-party java library, we have use case that requires
      1. using java enum types as field of scala case class
      2. using java enum as the type T in Dataset[T]

      Spark ExpressionEncoder already supports ser/de many java types in ScalaReflection, so we propose to add support for java enum as well, as a follow up of SPARK-21255.

      Attachments

        Issue Links

          Activity

            People

              xkrogen Erik Krogen
              shengzhixia Fangshi Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: