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
does not respect offset (and list cast even panics).
To Reproduce
#[test]fntest_utf8_cast_offsets(){// test if offset of the array is taken into account during castlet str_array = StringArray::from(vec!["a", "b", "c"]);let str_array = str_array.slice(1,2);let out = cast(&str_array,&DataType::LargeUtf8).unwrap();let large_str_array = out.as_any().downcast_ref::<LargeStringArray>().unwrap();let strs = large_str_array.into_iter().flatten().collect::<Vec<_>>();assert_eq!(strs, &["b", "c"])}#[test]fntest_list_cast_offsets(){// test if offset of the array is taken into account during castlet array1 = make_list_array().slice(1,2);let array2 = Arc::new(make_list_array())asArrayRef;let dt = DataType::LargeList(Box::new(Field::new("item",DataType::Int32,true)));let out1 = cast(&array1,&dt).unwrap();let out2 = cast(&array2,&dt).unwrap();assert_eq!(&out1, &out2.slice(1, 2))}
Expected behavior
Casting with correct offset.
The text was updated successfully, but these errors were encountered:
Describe the bug
Casting between:
does not respect offset (and list cast even panics).
To Reproduce
Expected behavior
Casting with correct offset.
The text was updated successfully, but these errors were encountered: