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
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
Casting temporal to utf8view is not currently supported.
#[test]fntest_cast_timestamp_to_strings(){// "2018-12-25T00:00:02.001", "1997-05-19T00:00:03.005", Nonelet array =
TimestampMillisecondArray::from(vec![Some(864000003005),Some(1545696002001),None]);let out = cast(&array,&DataType::Utf8).unwrap();let out = out
.as_any().downcast_ref::<StringArray>().unwrap().into_iter().collect::<Vec<_>>();assert_eq!(
out,
vec![Some("1997-05-19T00:00:03.005"),Some("2018-12-25T00:00:02.001"),None]);let out = cast(&array,&DataType::LargeUtf8).unwrap();let out = out
.as_any().downcast_ref::<LargeStringArray>().unwrap().into_iter().collect::<Vec<_>>();assert_eq!(
out,
vec![Some("1997-05-19T00:00:03.005"),Some("2018-12-25T00:00:02.001"),None]);let out = cast(&array,&DataType::Utf8View).unwrap();let out = out
.as_any().downcast_ref::<StringViewArray>().unwrap().into_iter().collect::<Vec<_>>();assert_eq!(
out,
vec![Some("1997-05-19T00:00:03.005"),Some("2018-12-25T00:00:02.001"),None]);}
CastError("Casting from Timestamp(Millisecond, None) to Utf8View not supported")
Describe the solution you'd like
Casting from temporal to utf8view arrays is supported.
Activity
Omega359 commentedon Nov 15, 2024
This came up as part of a review in #6719
alamb commentedon Dec 17, 2024
label_issue.pyautomatically added labels {'arrow'} from #6872