Skip to content

[fn][compute] Add support for Duration data type #28

@aymkhalil

Description

@aymkhalil

Support ISO 8601 Duration type: https://en.m.wikipedia.org/wiki/ISO_8601#Durations

In Avro, this is supported as built in logical type: https://avro.apache.org/docs/1.10.2/spec.html#Duration

Few notes:

  • Avro's durations accepts months, days and milliseconds.
  • java.util.Duration accepts the ISO format PnDTnHnMn.nS (notice no months or years)
  • java.util.Period accepts the ISO format PnYnMnD (notice no hours, min, seconds, etc)

So if we wanna support a full ISO8601 duration format (like PnYnMnDTnHnMnS) we can use:

Also Avro doesn't have the Duration logical type in their the API impl (although it is documented since Avro 2.8)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions