AVRO-2123: Duration logical type Java conversion
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
- [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message"
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.
assign to me
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?
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.
Closing, as there is now an alternative implementation.