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

Enforce time-millis and time-micros specification

    XMLWordPrintableJSON

Details

    Description

      During fixing AVRO-3471, I noticed that negative in/long values or negative TimeSpan values are allowed for time-millis and time-micros. https://avro.apache.org/docs/current/spec.html states that, it is supposed to be the number of us/ms after midnight 00:00:00. The following TimSpan values do not cause any overflow exceptions:

       

      "-00:00:00.001"

      "-999999.00:00:00"

       

      1. This change should throw exceptions in cases where the code has not thrown exceptions before
      2. OutOfRange exception message should be changed to `'time-millis/micros' value must be at least '00:00:00' and less than '1.00:00:00'.` to reflect the spec precisely

       

      It might make sense to introduce this change only in 1.12.0, because of all the above changes

      Attachments

        Issue Links

          Activity

            People

              zoltan_csizmadia Zoltan Csizmadia
              zoltan_csizmadia@yahoo.com Zoltan Csizmadia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Time Spent - 1h Remaining Estimate - 23h
                  23h
                  Logged:
                  Time Spent - 1h Remaining Estimate - 23h
                  1h