@@ -2120,19 +2120,6 @@ mod tests {
21202120 ) ;
21212121 }
21222122
2123- #[ test]
2124- fn test_return_large_array ( ) {
2125- let list_array = return_large_array ( ) ;
2126- let result = as_large_list_array ( & list_array) ;
2127- assert_eq ! ( result. len( ) , 1 ) ;
2128- assert_eq ! (
2129- & [ 1 , 2 , 3 , 4 ] ,
2130- as_int64_array( & result. value( 0 ) )
2131- . expect( "failed to cast to primitive array" )
2132- . values( )
2133- ) ;
2134- }
2135-
21362123 #[ test]
21372124 fn test_array_element ( ) {
21382125 // array_element([1, 2, 3, 4], 1) = 1
@@ -2894,25 +2881,6 @@ mod tests {
28942881 as_uint64_array ( & array) . expect ( "failed to initialize function array_ndims" ) ;
28952882
28962883 assert_eq ! ( result, & UInt64Array :: from_value( 4 , 1 ) ) ;
2897-
2898- // for LargeList
2899- // array_length([1, 2, 3, 4]) = 4
2900- let list_array = return_large_array ( ) ;
2901- let arr = array_length ( & [ list_array. clone ( ) ] )
2902- . expect ( "failed to initialize function array_ndims" ) ;
2903- let result =
2904- as_uint64_array ( & arr) . expect ( "failed to initialize function array_ndims" ) ;
2905-
2906- assert_eq ! ( result, & UInt64Array :: from_value( 4 , 1 ) ) ;
2907-
2908- // array_length([1, 2, 3, 4], 1) = 4
2909- let array =
2910- array_length ( & [ list_array. clone ( ) , Arc :: new ( Int64Array :: from_value ( 1 , 1 ) ) ] )
2911- . expect ( "failed to initialize function array_ndims" ) ;
2912- let result =
2913- as_uint64_array ( & array) . expect ( "failed to initialize function array_ndims" ) ;
2914-
2915- assert_eq ! ( result, & UInt64Array :: from_value( 4 , 1 ) ) ;
29162884 }
29172885
29182886 #[ test]
@@ -2952,43 +2920,6 @@ mod tests {
29522920 as_uint64_array ( & arr) . expect ( "failed to initialize function array_length" ) ;
29532921
29542922 assert_eq ! ( result, & UInt64Array :: from( vec![ None ] ) ) ;
2955-
2956- // for LargeList
2957- let list_array = return_nested_large_array ( ) ;
2958-
2959- // array_length([[1, 2, 3, 4], [5, 6, 7, 8]]) = 2
2960- let arr = array_length ( & [ list_array. clone ( ) ] )
2961- . expect ( "failed to initialize function array_length" ) ;
2962- let result =
2963- as_uint64_array ( & arr) . expect ( "failed to initialize function array_length" ) ;
2964-
2965- assert_eq ! ( result, & UInt64Array :: from_value( 2 , 1 ) ) ;
2966-
2967- // array_length([[1, 2, 3, 4], [5, 6, 7, 8]], 1) = 2
2968- let arr =
2969- array_length ( & [ list_array. clone ( ) , Arc :: new ( Int64Array :: from_value ( 1 , 1 ) ) ] )
2970- . expect ( "failed to initialize function array_length" ) ;
2971- let result =
2972- as_uint64_array ( & arr) . expect ( "failed to initialize function array_length" ) ;
2973-
2974- assert_eq ! ( result, & UInt64Array :: from_value( 2 , 1 ) ) ;
2975-
2976- // array_length([[1, 2, 3, 4], [5, 6, 7, 8]], 2) = 4
2977- let arr =
2978- array_length ( & [ list_array. clone ( ) , Arc :: new ( Int64Array :: from_value ( 2 , 1 ) ) ] )
2979- . expect ( "failed to initialize function array_length" ) ;
2980- let result =
2981- as_uint64_array ( & arr) . expect ( "failed to initialize function array_length" ) ;
2982-
2983- assert_eq ! ( result, & UInt64Array :: from_value( 4 , 1 ) ) ;
2984-
2985- // array_length([[1, 2, 3, 4], [5, 6, 7, 8]], 3) = NULL
2986- let arr = array_length ( & [ list_array, Arc :: new ( Int64Array :: from_value ( 3 , 1 ) ) ] )
2987- . expect ( "failed to initialize function array_length" ) ;
2988- let result =
2989- as_uint64_array ( & arr) . expect ( "failed to initialize function array_length" ) ;
2990-
2991- assert_eq ! ( result, & UInt64Array :: from( vec![ None ] ) ) ;
29922923 }
29932924
29942925 #[ test]
@@ -3084,18 +3015,6 @@ mod tests {
30843015 make_array ( & args) . expect ( "failed to initialize function array" )
30853016 }
30863017
3087- fn return_large_array ( ) -> ArrayRef {
3088- // Returns: [1, 2, 3, 4]
3089- let args = [
3090- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 1 ) ] ) ) as ArrayRef ,
3091- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 2 ) ] ) ) as ArrayRef ,
3092- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 3 ) ] ) ) as ArrayRef ,
3093- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 4 ) ] ) ) as ArrayRef ,
3094- ] ;
3095- let data_type = DataType :: Int64 ;
3096- array_array :: < i64 > ( & args, data_type) . expect ( "failed to initialize function array" )
3097- }
3098-
30993018 fn return_nested_array ( ) -> ArrayRef {
31003019 // Returns: [[1, 2, 3, 4], [5, 6, 7, 8]]
31013020 let args = [
@@ -3117,33 +3036,6 @@ mod tests {
31173036 make_array ( & [ arr1, arr2] ) . expect ( "failed to initialize function array" )
31183037 }
31193038
3120- fn return_nested_large_array ( ) -> ArrayRef {
3121- // Returns: [[1, 2, 3, 4], [5, 6, 7, 8]]
3122- let args = [
3123- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 1 ) ] ) ) as ArrayRef ,
3124- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 2 ) ] ) ) as ArrayRef ,
3125- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 3 ) ] ) ) as ArrayRef ,
3126- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 4 ) ] ) ) as ArrayRef ,
3127- ] ;
3128- let data_type = DataType :: Int64 ;
3129- let arr1 = array_array :: < i64 > ( & args, data_type. clone ( ) )
3130- . expect ( "failed to initialize function array" ) ;
3131-
3132- let args = [
3133- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 5 ) ] ) ) as ArrayRef ,
3134- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 6 ) ] ) ) as ArrayRef ,
3135- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 7 ) ] ) ) as ArrayRef ,
3136- Arc :: new ( Int64Array :: from ( vec ! [ Some ( 8 ) ] ) ) as ArrayRef ,
3137- ] ;
3138- let arr2 = array_array :: < i64 > ( & args, data_type)
3139- . expect ( "failed to initialize function array" ) ;
3140- let data_type =
3141- DataType :: LargeList ( Arc :: new ( Field :: new ( "item" , DataType :: Int64 , true ) ) ) ;
3142-
3143- array_array :: < i64 > ( & [ arr1, arr2] , data_type)
3144- . expect ( "failed to initialize function array" )
3145- }
3146-
31473039 fn return_array_with_nulls ( ) -> ArrayRef {
31483040 // Returns: [1, NULL, 3, NULL]
31493041 let args = [
0 commit comments