From 0b0e475e6d8834c24769017fa417f1c420be6760 Mon Sep 17 00:00:00 2001 From: Weijun Huang Date: Sat, 2 Dec 2023 14:53:18 +0100 Subject: [PATCH] return based on data_type in make_array --- datafusion/physical-expr/src/array_expressions.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/datafusion/physical-expr/src/array_expressions.rs b/datafusion/physical-expr/src/array_expressions.rs index 8325ad75ce1c2..8609d6b7d110e 100644 --- a/datafusion/physical-expr/src/array_expressions.rs +++ b/datafusion/physical-expr/src/array_expressions.rs @@ -373,15 +373,8 @@ pub fn make_array(arrays: &[ArrayRef]) -> Result { 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::(arrays, data_type) - } else if len <= i64::MAX as usize { - array_array::(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::(arrays, data_type), + _ => array_array::(arrays, data_type), } }