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

Metadata serialize null values throw NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 2.3.3, 2.4.1, 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      How to reproduce this issue:

      scala> val meta = new org.apache.spark.sql.types.MetadataBuilder().putNull("key").build().json
      java.lang.NullPointerException
        at org.apache.spark.sql.types.Metadata$.org$apache$spark$sql$types$Metadata$$toJsonValue(Metadata.scala:196)
        at org.apache.spark.sql.types.Metadata$$anonfun$1.apply(Metadata.scala:180)
      

        Attachments

          Activity

            People

            • Assignee:
              yumwang Yuming Wang
              Reporter:
              yumwang Yuming Wang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: