avro icon indicating copy to clipboard operation
avro copied to clipboard

AVRO-2123: Duration logical type Java conversion

Open robvadai opened this issue 4 years ago • 1 comments

Implementation of http://avro.apache.org/docs/current/spec.html#Duration

Can be used to serialize/deserialize to/from Java POJOs and Generic Fixed type.

Make sure you have checked all steps below.

Jira

  • [x] My PR addresses the following Avro Jira issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
    • https://issues.apache.org/jira/browse/AVRO-2123

Tests

  • [x] My PR adds the following unit tests:
  • lang/java/avro/src/test/java/org/apache/avro/TestDurationConversion.java

Commits

Documentation

  • [x] In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does: existing conversaion don't have Javadoc so I didn't add one. This is considered an internal API IMHO.

robvadai avatar Jun 19 '21 11:06 robvadai

assign to me

adiroy05 avatar Dec 20 '21 18:12 adiroy05

Hi @robvadai i'm looking forward to have that feature in Avro, could you please tell us whether you are going to continue work on it or not?

snuyanzin avatar Jun 02 '23 09:06 snuyanzin

As an alternative to this PR, I've opened #2520. This implements a new Java Time class TimePeriod, that combines functionality of java.time.Period and java.time.Duration. Other than that, the PR is equivalent.

opwvhk avatar Sep 26 '23 07:09 opwvhk

Closing, as there is now an alternative implementation.

opwvhk avatar Oct 05 '23 08:10 opwvhk