Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support duration logical type #206

Closed
Chuckame opened this issue May 3, 2024 · 1 comment · Fixed by #233
Closed

Support duration logical type #206

Chuckame opened this issue May 3, 2024 · 1 comment · Fixed by #233
Labels
enhancement New feature or request

Comments

@Chuckame
Copy link
Contributor

Chuckame commented May 3, 2024

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

@Chuckame Chuckame added the enhancement New feature or request label May 3, 2024
This was referenced Jul 8, 2024
@Chuckame Chuckame linked a pull request Jul 10, 2024 that will close this issue
@Chuckame
Copy link
Contributor Author

Released in v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant