arrow-rs: Rust Interval definition incorrect

It seems the Rust INTERVAL definition is incorrect. Please see https://github.com/duckdb/duckdb-wasm/issues/1696#issuecomment-2047021075 for more details on the bug and where it occurs in the code.

Particularly this definition: https://github.com/apache/arrow-rs/blob/36a6e515f99866eae5332dfc887c6cb5f8135064/arrow-array/src/types.rs#L265-L269

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@alamb and I had a good discussion about the pros/cons of switching to a structured representation (#3125), vs simply flipping the order (#5656). The broad points were:

As such the decision was that a custom struct should be used where operations, such as arithmetic, on the integral representation have no semantic meaning. Specifically this means types such as timestamps, decimals, and even IntervalYearMonth should remain using integral types as their native representation, as operations on the integral representation are well-defined. However, types like IntervalMonthDayNano or ByteView (#5736) should switch to a non-integral representation.

We are holding the 52.0.0 release for this. I expect it will be available in about 2 weeks but no promises, etc

Typing down some things that @tustvold told me today:

  1. we think the tests ensure the data round trips but does not actually ensure both ends interpret them in the same way (aka they don’t cover this particular bug)
  2. He plans to work on this ticket, likely next week(ish)
  3. In order to avoid subtle breaking changes (due to the same type i128 being interpreted differently by different versions) he plans to do something like https://github.com/apache/arrow-rs/issues/3125