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
Creating a PrimitiveArray from ArrayData validates that the DataType has the same discriminant as expected. For almost all types this is sufficient, with exception to DataType::Interval.
This is because DataType::Interval has a different backing primitive depending on the value of IntervalUnit
To Reproduce
#[test]
fn test_invalid_interval_type() {
let array = IntervalDayTimeArray::from(vec![1, 2, 3]);
let _ = IntervalMonthDayNanoArray::from(array.into_data());
}
Describe the bug
Creating a
PrimitiveArray
fromArrayData
validates that theDataType
has the same discriminant as expected. For almost all types this is sufficient, with exception toDataType::Interval
.This is because
DataType::Interval
has a different backing primitive depending on the value ofIntervalUnit
To Reproduce
The above should panic, but doesn't
Expected behavior
Additional context
This is a follow on to #2834
The text was updated successfully, but these errors were encountered: