You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let builder = ArrayData::builder(DataType::Decimal(precision, scale)).len(v.len()).add_buffer(v.data_ref().child_data()[0].buffers()[0].clone()).null_bit_buffer(v.data_ref().null_buffer().cloned()).offset(v.offset());
However, the answer is still not 100% correct when the offset of the child data > 0. (Nested offsets always make me confused 😅).
The way I prefer is to build decimal array from FixedSizeBinaryArray and drop this method, so that we can avoid nested offsets. Maybe we can file another issue to track this.
The text was updated successfully, but these errors were encountered:
Describe the bug
from_fixed_size_list_array
cannot return a correct result whenarray.offset() > 0
To Reproduce
Expected behavior
Pass the test.
Additional context
The reason of the failure is that we drop the
offset
when copyingvalue_buffer
andnull_buffer
:https://github.com/apache/arrow-rs/blob/master/arrow/src/array/array_binary.rs#L846-L849
A straight way is to add the offset:
However, the answer is still not 100% correct when the offset of the child data > 0. (Nested offsets always make me confused 😅).
The way I prefer is to build decimal array from
FixedSizeBinaryArray
and drop this method, so that we can avoid nested offsets. Maybe we can file another issue to track this.The text was updated successfully, but these errors were encountered: