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
{{ message }}
Repository navigation
substring does not support Utf8View or BinaryView #10671
substring(Utf8View ) ERR: Compute error: substring does not support type Utf8View
substring(BinaryView) ERR: Compute error: substring does not support type BinaryView
substring(Dict<Utf8View>) ERR: Compute error: substring does not support type Utf8View
It takes Utf8, LargeUtf8, Binary, LargeBinary, FixedSizeBinary and Dictionary, so a caller holding StringViewArray has to cast to Utf8 first, which copies the data.
The other string kernels in the same crate already take views: length, bit_length, like and concat_elements all have DataType::Utf8View arms. substring.rs is the only file in arrow-string/src that handles Utf8 and never mentions Utf8View.
To Reproduce
use arrow_array::StringViewArray;use arrow_string::substring::substring;let array = StringViewArray::from(vec![Some("hello world")]);let err = substring(&array,0,Some(5)).unwrap_err();assert_eq!(err.to_string(),"Compute error: substring does not support type Utf8View");
Expected behavior
substring accepts Utf8View and BinaryView and returns the same values the Utf8 and Binary paths return for the same input, including for a dictionary whose values are a view array.
Activity
Support Utf8View and BinaryView in substring (apache#10672)
Support Utf8View and BinaryView in substring (apache#10672)