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

Add configuration to support JacksonGenrator to keep fields with null values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      DataSet.toJSON will lost some column when field data is null. Maybe it is better to keep null data in some scenarios.

      Such as sparkmagic, which is widely used in jupyter with livy, we use toJSON to toJSON is used to get sql results. with toJSON sparkmagic may return empty results, which confused users.

      Maybe adding a config is the best choice. This configuration retains the current semantics and will remain fields with null until the configuration is modified.

      Attachments

        Issue Links

          Activity

            People

              Jackey Lee Jackey Lee
              Jackey Lee Jackey Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: