Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2369

Provide external way to construct Schema.Field with default value of 'null'

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.0
    • Component/s: java
    • Labels:
      None

      Description

      After making the Schema.Field constructor which takes the default value as a JsonNode was made package private, there is no external way to construct a field that has a default value of 'null'. Internally that constructor will call JacksonUtils.toJsonNode(defaultValue), which will return 'null' when passed null, and the resulting Field will not have a default value (the json node would need to be NullNode instead of simply null itself). This will affect projects that need a way to dynamically build schemas and their fields.

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              igreene Ivan Greene
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: