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

Avro Rust cannot parse default int logical-type date in a valid schema

    XMLWordPrintableJSON

Details

    Description

      This is a follow-up for an issue found through rsgen-avro:

      https://github.com/lerouxrgd/rsgen-avro/pull/60#issuecomment-1884938904

      As mentioned in the thread, apache-avro 0.16.0 cannot parse this schema anymore:

      {
        "type": "record",
        "name": "DateLogicalType",
        "fields": [ {
          "name": "birthday",
          "type": {"type": "int", "logicalType": "date"},
          "default": 1681601653
        } ]
      }

      The issue is specifically the default value of the birthday field.

      However this one is fine:

      {
        "type": "record",
        "name": "DateLogicalType",
        "fields": [ {
          "name": "release_datetime_micro",
          "type": {"type": "long", "logicalType": "timestamp-micros"},
          "default": 1570903062000000
        } ]
      }

       

       

       

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              lerouxrgd Romain Leroux
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m