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

    • Task
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.9.0
    • java
    • 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

            dkulp Daniel Kulp
            igreene Ivan Greene
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: