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

IntervalMonthDayNanoType::make_value() does not match C implementation #2234

Closed
avantgardnerio opened this issue Jul 29, 2022 · 0 comments · Fixed by #2235
Closed

IntervalMonthDayNanoType::make_value() does not match C implementation #2234

avantgardnerio opened this issue Jul 29, 2022 · 0 comments · Fixed by #2235
Labels
arrow Changes to the arrow crate bug

Comments

@avantgardnerio
Copy link
Contributor

Describe the bug
There used to be no standard way of creating native Arrow types, and the documentation is ambiguous as to physical memory layout. As such, I thought it would be a good idea to create standardized make_value() and to_parts() methods for each type. Due to reasons I no longer remember, I thought months, days, and nanos were stored in reverse order.

@alamb found my mistake in this PR. I have since tracked down the C implementation structs to confirm the implementation (and unit tests) are now correct, as well as adding ascii art documentation to help communicate the memory format to future contributors.

To Reproduce
Invoke IntervalMonthDayNanoType::make_value() to create a duration, then attempt to pass it to C/Python/Java for decoding.

Expected behavior
The generated value conforms to specifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants