Skip to content

Support duration logical type #206

Closed
@Chuckame

Description

Added in the latest 1.11 avro spec, duration is a new standard logical type, encoded as a fixed of 12 bytes.

It should handle java.time.Duration and kotlin.time.duration as the kotlin type is not a type alias but a real different class.

Encoding:

In the given order, 3 numbers of 4 bytes each (no zig-zag encoding):

  • number of months
  • then the number of days
  • then the number of milliseconds

The logical type name must be duration

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions