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

DefaultValue() returns Ints for Long fields

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.8.1
    • 1.9.0, 1.8.2
    • java
    • None

    Description

      I am iterating over the schemas for getting default values for fields. When the type of a field is Long Avro returns INT instead:
      field.defaultVal()
      -->Field.defaultVal()
      -->Jacksonutils.toObject(jsonNode)
      -->Jacksonutils.toObject(jsonNode, null)

      The Field class already contains the information ("long"), so shouldn't the Field class use Jacksonutils-toObject-Method with schema? Otherwise it is always null and Integer are returned.

      Attachments

        Issue Links

          Activity

            People

              gszadovszky Gabor Szadovszky
              manuelp3 Manuel Rieke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: