Skip to content

Commit

Permalink
return based on data_type in make_array
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Dec 2, 2023
1 parent 05e365a commit 0b0e475
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions datafusion/physical-expr/src/array_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,8 @@ pub fn make_array(arrays: &[ArrayRef]) -> Result<ArrayRef> {
exec_err!("The number of elements {} in the array exceed the maximum number of elements supported by DataFusion",len)
}
}
data_type => {
if len <= i32::MAX as usize {
array_array::<i32>(arrays, data_type)
} else if len <= i64::MAX as usize {
array_array::<i64>(arrays, data_type)
} else {
exec_err!("The number of elements {} in the array exceed the maximum number of elements supported by DataFusion",len)
}
}
DataType::LargeList(..) => array_array::<i64>(arrays, data_type),
_ => array_array::<i32>(arrays, data_type),
}
}

Expand Down

0 comments on commit 0b0e475

Please sign in to comment.