Skip to content

Commit

Permalink
Return type cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
Omega359 committed Nov 17, 2024
1 parent eaf30b5 commit 203cd9e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions datafusion/functions-nested/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,12 @@ impl ScalarUDFImpl for StringToArray {

fn return_type(&self, arg_types: &[DataType]) -> Result<DataType> {
Ok(match arg_types[0] {
Utf8 | LargeUtf8 => {
Utf8 | Utf8View | LargeUtf8 => {
List(Arc::new(Field::new("item", arg_types[0].clone(), true)))
}
Utf8View => List(Arc::new(Field::new("item", Utf8View, true))),
_ => {
return plan_err!(
"The string_to_array function can only accept Utf8, LargeUtf8 or Utf8View."
"The string_to_array function can only accept Utf8, Utf8View or LargeUtf8."
);
}
})
Expand Down

0 comments on commit 203cd9e

Please sign in to comment.