diff --git a/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference b/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference new file mode 100644 index 00000000000..e46a94775cd --- /dev/null +++ b/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.reference @@ -0,0 +1,1216 @@ +const args +concat +[] +[] +[] +[NULL] +[NULL,1] +[1,2,-1,-2,0.3,0.7,NULL] +\N +\N +[1,2,3,4] +[1,2,3,4] +[] +['abc','def','gh','qwe'] +[1,NULL,2,3,NULL,4] +[1,NULL,2,3,4] +slice +\N +[1,2,3,4,5,6] +[2,3,4,5,6] +[1,2,3,4] +[1,2,3,4] +[4,5,6] +[2,3,4] +[2,3,4] +[3,4] +[3,4] +[] +[] +[] +[] +[] +[2,NULL,4,5] +['b','c','d'] +['b',NULL,'d'] +push back +\N +[1,1] +[NULL,1] +[0.5,0.7,1] +[1,-1] +['a','b','cd'] +[1] +[-1] +push front +\N +[1,1] +[1,NULL] +[1,0.5,0.7] +[-1,1] +['cd','a','b'] +[1] +[-1] +pop back +\N +[] +[] +[1,2] +[0.1,0.2] +['a','b'] +pop front +\N +[] +[] +[2,3] +[0.2,0.3] +['b','c'] + +table +[] [] 1 \N 1 \N +[] [1] 1 \N 1 \N +[1,2,3,4,5] [6,7] 2 \N 1 \N +[1,2,3,4,5,6,7] [8] 2 2 3 3 +[1,2,3,4,5,6,7] [] 2 \N -3 -3 +[1,2,3,4,5,6,7] [] 2 \N -3 \N +[1,2,3,4,5,6,7] [] -5 -5 4 4 +[1,2,3,4,5,6,7] [] -5 -5 -3 -3 +concat arr1, arr2 +[] [] [] +[1] [] [1] +[1,2,3,4,5,6,7] [1,2,3,4,5] [6,7] +[1,2,3,4,5,6,7,8] [1,2,3,4,5,6,7] [8] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +concat arr1, arr2, arr1 +[] [] [] +[1] [] [1] +[1,2,3,4,5,6,7,1,2,3,4,5] [1,2,3,4,5] [6,7] +[1,2,3,4,5,6,7,8,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [8] +[1,2,3,4,5,6,7,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +[1,2,3,4,5,6,7,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [] +arraySlice(arr1, o, l) +[] 1 1 [] +[] 1 1 [] +[1,2,3,4,5] 2 1 [2] +[1,2,3,4,5,6,7] 2 3 [2,3,4] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,2,3,4,5,6,7] -5 -3 [3,4] +arraySlice(arr1, no, nl) +[] \N \N [] +[] \N \N [] +[1,2,3,4,5] \N \N [1,2,3,4,5] +[1,2,3,4,5,6,7] 2 3 [2,3,4] +[1,2,3,4,5,6,7] \N -3 [1,2,3,4] +[1,2,3,4,5,6,7] \N \N [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,2,3,4,5,6,7] -5 -3 [3,4] +arraySlice(arr1, 2, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,2,3,4,5,6,7] 2 3 [2,3,4] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +arraySlice(arr1, o, 2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,2,3,4,5,6,7] 2 2 [2,3] +[1,2,3,4,5,6,7] 2 2 [2,3] +[1,2,3,4,5,6,7] 2 2 [2,3] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,2,3,4,5,6,7] -5 2 [3,4] +arraySlice(arr1, 2, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,2,3,4,5,6,7] 2 3 [2,3,4] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 \N [2,3,4,5,6,7] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 -3 [2,3,4] +arraySlice(arr1, no, 2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2] +[1,2,3,4,5,6,7] 2 2 [2,3] +[1,2,3,4,5,6,7] \N 2 [1,2] +[1,2,3,4,5,6,7] \N 2 [1,2] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,2,3,4,5,6,7] -5 2 [3,4] +arraySlice(arr1, -4, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,2,3,4,5,6,7] 2 3 [4,5,6] +[1,2,3,4,5,6,7] 2 -3 [4] +[1,2,3,4,5,6,7] 2 -3 [4] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,2,3,4,5,6,7] 2 -3 [4] +arraySlice(arr1, o, -2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,2,3,4,5,6,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +arraySlice(arr1, -4, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,2,3,4,5,6,7] 2 3 [4,5,6] +[1,2,3,4,5,6,7] 2 -3 [4] +[1,2,3,4,5,6,7] 2 \N [4,5,6,7] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,2,3,4,5,6,7] 2 -3 [4] +arraySlice(arr1, no, -2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2,3] +[1,2,3,4,5,6,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] \N 2 [1,2,3,4,5] +[1,2,3,4,5,6,7] \N 2 [1,2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +arraySlice(arr1, 2, 4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +arraySlice(arr1, 2, -4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +arraySlice(arr1, -4, 2) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +arraySlice(arr1, -4, -1) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +arrayPushFront(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +arrayPushFront(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +arrayPushFront(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,1,2,3,4,5] +[1,2,3,4,5,6,7] [3,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [-3,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [-3,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [-3,1,2,3,4,5,6,7] +arrayPushFront(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [NULL,1,2,3,4,5] +[1,2,3,4,5,6,7] [3,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [-3,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [NULL,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,2,3,4,5,6,7] [-3,1,2,3,4,5,6,7] +arrayPushFront([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +[NULL,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushBack(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [2,3,4,5,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +arrayPushBack(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [2,3,4,5,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +arrayPushBack(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,2,3,4,5,1] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,-3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,-3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,-3] +arrayPushBack(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [1,2,3,4,5,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,-3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,-3] +arrayPushBack([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[3] +[-3] +[-3] +[4] +[-3] +arrayPushBack([1, 2, 3], nl) +[1,1,1,NULL] +[NULL] +[NULL] +[3] +[-3] +[NULL] +[4] +[-3] +arrayPopFront(arr1) +[] [] +[] [] +[1,2,3,4,5] [2,3,4,5] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +arrayPopBack(arr1) +[] [] +[] [] +[1,2,3,4,5] [1,2,3,4] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] + +table +[] [] 1 \N 1 \N +[] [1,NULL] 1 \N 1 \N +[1,2,3,4,5] [6,NULL] 2 \N 1 \N +[1,NULL,3,4,NULL,6,7] [8] 2 2 3 3 +[1,2,3,NULL,5,6,7] [NULL,1] 2 \N -3 -3 +[1,2,3,4,5,NULL,7] [1,NULL] 2 \N -3 \N +[1,2,3,4,5,6,7] [1,2] -5 -5 4 4 +[1,NULL,3,NULL,5,6,7] [] -5 -5 -3 -3 +concat arr1, arr2 +[] [] [] +[1,NULL] [] [1,NULL] +[1,2,3,4,5,6,NULL] [1,2,3,4,5] [6,NULL] +[1,NULL,3,4,NULL,6,7,8] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,NULL,1] [1,2,3,NULL,5,6,7] [NULL,1] +[1,2,3,4,5,NULL,7,1,NULL] [1,2,3,4,5,NULL,7] [1,NULL] +[1,2,3,4,5,6,7,1,2] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +concat arr1, arr2, arr1 +[] [] [] +[1,NULL] [] [1,NULL] +[1,2,3,4,5,6,NULL,1,2,3,4,5] [1,2,3,4,5] [6,NULL] +[1,NULL,3,4,NULL,6,7,8,1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,NULL,1,1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] [NULL,1] +[1,2,3,4,5,NULL,7,1,NULL,1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] [1,NULL] +[1,2,3,4,5,6,7,1,2,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7,1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +arraySlice(arr1, o, l) +[] 1 1 [] +[] 1 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,NULL,3,NULL,5,6,7] -5 -3 [3,NULL] +arraySlice(arr1, no, nl) +[] \N \N [] +[] \N \N [] +[1,2,3,4,5] \N \N [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] \N -3 [1,2,3,NULL] +[1,2,3,4,5,NULL,7] \N \N [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,NULL,3,NULL,5,6,7] -5 -3 [3,NULL] +arraySlice(arr1, 2, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL,3,NULL] +arraySlice(arr1, o, 2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3] +[1,2,3,NULL,5,6,7] 2 2 [2,3] +[1,2,3,4,5,NULL,7] 2 2 [2,3] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL] +arraySlice(arr1, 2, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 \N [2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL,3,NULL] +arraySlice(arr1, no, 2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3] +[1,2,3,NULL,5,6,7] \N 2 [1,2] +[1,2,3,4,5,NULL,7] \N 2 [1,2] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL] +arraySlice(arr1, -4, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 -3 [NULL] +[1,2,3,4,5,NULL,7] 2 -3 [4] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL] +arraySlice(arr1, o, -2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] 2 2 [2,3,NULL,5] +[1,2,3,4,5,NULL,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL,5] +arraySlice(arr1, -4, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 -3 [NULL] +[1,2,3,4,5,NULL,7] 2 \N [4,5,NULL,7] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL] +arraySlice(arr1, no, -2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] \N 2 [1,2,3,NULL,5] +[1,2,3,4,5,NULL,7] \N 2 [1,2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL,5] +arraySlice(arr1, 2, 4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 4 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [2,3,NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,3,NULL,5] +arraySlice(arr1, 2, -4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,NULL,3,4,NULL,6,7] 2 4 [NULL,3] +[1,2,3,NULL,5,6,7] 2 4 [2,3] +[1,2,3,4,5,NULL,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,3] +arraySlice(arr1, -4, 2) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +arraySlice(arr1, -4, -1) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +arrayPushFront(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [3,1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [-3,1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [-3,1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [-3,1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [NULL,1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [3,1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [-3,1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [NULL,1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [-3,1,NULL,3,NULL,5,6,7] +arrayPushFront([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +[NULL,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushBack(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [2,3,4,5,1] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7,1] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7,1] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7,1] +arrayPushBack(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [2,3,4,5,0.1] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7,0.1] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7,0.1] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7,0.1] +arrayPushBack(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,2,3,4,5,1] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7,3] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7,-3] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7,-3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7,-3] +arrayPushBack(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [1,2,3,4,5,NULL] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7,3] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7,-3] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7,-3] +arrayPushBack([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[3] +[-3] +[-3] +[4] +[-3] +arrayPushBack([1, 2, 3], nl) +[1,1,1,NULL] +[NULL] +[NULL] +[3] +[-3] +[NULL] +[4] +[-3] +arrayPopFront(arr1) +[] [] +[] [] +[1,2,3,4,5] [2,3,4,5] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7] +arrayPopBack(arr1) +[] [] +[] [] +[1,2,3,4,5] [1,2,3,4] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6] + +table +[] [] 1 \N 1 \N +[] [1,2] 1 \N 1 \N +[1,2,3,4,5] [6,7] 2 \N 1 \N +[1,NULL,3,4,NULL,6,7] [8] 2 2 3 3 +[1,2,3,NULL,5,6,7] [0,1] 2 \N -3 -3 +[1,2,3,4,5,NULL,7] [1,2] 2 \N -3 \N +[1,2,3,4,5,6,7] [1,2] -5 -5 4 4 +[1,NULL,3,NULL,5,6,7] [] -5 -5 -3 -3 +concat arr1, arr2 +[] [] [] +[1,2] [] [1,2] +[1,2,3,4,5,6,7] [1,2,3,4,5] [6,7] +[1,NULL,3,4,NULL,6,7,8] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,0,1] [1,2,3,NULL,5,6,7] [0,1] +[1,2,3,4,5,NULL,7,1,2] [1,2,3,4,5,NULL,7] [1,2] +[1,2,3,4,5,6,7,1,2] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +concat arr1, arr2, arr1 +[] [] [] +[1,2] [] [1,2] +[1,2,3,4,5,6,7,1,2,3,4,5] [1,2,3,4,5] [6,7] +[1,NULL,3,4,NULL,6,7,8,1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,0,1,1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] [0,1] +[1,2,3,4,5,NULL,7,1,2,1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] [1,2] +[1,2,3,4,5,6,7,1,2,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7,1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +[] [] 1 \N 1 \N +[] [1,2] 1 \N 1 \N +[1,2,3,4,5] [6,7] 2 \N 1 \N +[1,NULL,3,4,NULL,6,7] [8] 2 2 3 3 +[1,2,3,NULL,5,6,7] [0,1] 2 \N -3 -3 +[1,2,3,4,5,NULL,7] [1,2] 2 \N -3 \N +[1,2,3,4,5,6,7] [1,2] -5 -5 4 4 +[1,NULL,3,NULL,5,6,7] [] -5 -5 -3 -3 +concat arr1, arr2 +[] [] [] +[1,2] [] [1,2] +[1,2,3,4,5,6,7] [1,2,3,4,5] [6,7] +[1,NULL,3,4,NULL,6,7,8] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,0,1] [1,2,3,NULL,5,6,7] [0,1] +[1,2,3,4,5,NULL,7,1,2] [1,2,3,4,5,NULL,7] [1,2] +[1,2,3,4,5,6,7,1,2] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +concat arr1, arr2, arr1 +[] [] [] +[1,2] [] [1,2] +[1,2,3,4,5,6,7,1,2,3,4,5] [1,2,3,4,5] [6,7] +[1,NULL,3,4,NULL,6,7,8,1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] [8] +[1,2,3,NULL,5,6,7,0,1,1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] [0,1] +[1,2,3,4,5,NULL,7,1,2,1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] [1,2] +[1,2,3,4,5,6,7,1,2,1,2,3,4,5,6,7] [1,2,3,4,5,6,7] [1,2] +[1,NULL,3,NULL,5,6,7,1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] [] +arraySlice(arr1, o, l) +[] 1 1 [] +[] 1 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,NULL,3,NULL,5,6,7] -5 -3 [3,NULL] +arraySlice(arr1, no, nl) +[] \N \N [] +[] \N \N [] +[1,2,3,4,5] \N \N [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] \N -3 [1,2,3,NULL] +[1,2,3,4,5,NULL,7] \N \N [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] -5 4 [3,4,5,6] +[1,NULL,3,NULL,5,6,7] -5 -3 [3,NULL] +arraySlice(arr1, 2, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 -3 [2,3,4] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL,3,NULL] +arraySlice(arr1, o, 2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3] +[1,2,3,NULL,5,6,7] 2 2 [2,3] +[1,2,3,4,5,NULL,7] 2 2 [2,3] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL] +arraySlice(arr1, 2, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [NULL,3,4] +[1,2,3,NULL,5,6,7] 2 -3 [2,3,NULL] +[1,2,3,4,5,NULL,7] 2 \N [2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL,3,NULL] +arraySlice(arr1, no, 2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3] +[1,2,3,NULL,5,6,7] \N 2 [1,2] +[1,2,3,4,5,NULL,7] \N 2 [1,2] +[1,2,3,4,5,6,7] -5 2 [3,4] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL] +arraySlice(arr1, -4, l) +[] 2 1 [] +[] 2 1 [] +[1,2,3,4,5] 2 1 [2] +[1,NULL,3,4,NULL,6,7] 2 3 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 -3 [NULL] +[1,2,3,4,5,NULL,7] 2 -3 [4] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL] +arraySlice(arr1, o, -2) +[] 1 2 [] +[] 1 2 [] +[1,2,3,4,5] 2 2 [2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] 2 2 [2,3,NULL,5] +[1,2,3,4,5,NULL,7] 2 2 [2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL,5] +arraySlice(arr1, -4, nl) +[] 2 \N [] +[] 2 \N [] +[1,2,3,4,5] 2 \N [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 3 [4,NULL,6] +[1,2,3,NULL,5,6,7] 2 -3 [NULL] +[1,2,3,4,5,NULL,7] 2 \N [4,5,NULL,7] +[1,2,3,4,5,6,7] 2 4 [4,5,6,7] +[1,NULL,3,NULL,5,6,7] 2 -3 [NULL] +arraySlice(arr1, no, -2) +[] \N 2 [] +[] \N 2 [] +[1,2,3,4,5] \N 2 [1,2,3] +[1,NULL,3,4,NULL,6,7] 2 2 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] \N 2 [1,2,3,NULL,5] +[1,2,3,4,5,NULL,7] \N 2 [1,2,3,4,5] +[1,2,3,4,5,6,7] -5 2 [3,4,5] +[1,NULL,3,NULL,5,6,7] -5 2 [3,NULL,5] +arraySlice(arr1, 2, 4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3,4,5] +[1,NULL,3,4,NULL,6,7] 2 4 [NULL,3,4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [2,3,NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [2,3,4,5] +[1,2,3,4,5,6,7] 2 4 [2,3,4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,3,NULL,5] +arraySlice(arr1, 2, -4) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,NULL,3,4,NULL,6,7] 2 4 [NULL,3] +[1,2,3,NULL,5,6,7] 2 4 [2,3] +[1,2,3,4,5,NULL,7] 2 4 [2,3] +[1,2,3,4,5,6,7] 2 4 [2,3] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,3] +arraySlice(arr1, -4, 2) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [2,3] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +arraySlice(arr1, -4, -1) +[] 2 4 [] +[] 2 4 [] +[1,2,3,4,5] 2 4 [] +[1,NULL,3,4,NULL,6,7] 2 4 [4,NULL] +[1,2,3,NULL,5,6,7] 2 4 [NULL,5] +[1,2,3,4,5,NULL,7] 2 4 [4,5] +[1,2,3,4,5,6,7] 2 4 [4,5] +[1,NULL,3,NULL,5,6,7] 2 4 [NULL,5] +arrayPushFront(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [3,1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [-3,1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [-3,1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [-3,1,NULL,3,NULL,5,6,7] +arrayPushFront(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [NULL,1,2,3,4,5] +[1,NULL,3,4,NULL,6,7] [3,1,NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [-3,1,2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [NULL,1,2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [4,1,2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [-3,1,NULL,3,NULL,5,6,7] +arrayPushFront([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +arrayPushFront([1, 2, 3], nl) +[NULL,1,1,1] +[1] +[1] +[1] +[1] +[1] +[2] +[3] +arrayPushBack(arr1, 1) +[] [1] +[] [] +[1,2,3,4,5] [2,3,4,5,1] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7,1] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7,1] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7,1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,1] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7,1] +arrayPushBack(arr1, 0.1) +[] [0.1] +[] [] +[1,2,3,4,5] [2,3,4,5,0.1] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7,0.1] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7,0.1] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7,0.1] +[1,2,3,4,5,6,7] [2,3,4,5,6,7,0.1] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7,0.1] +arrayPushBack(arr1, l) +[] [1] +[] [1] +[1,2,3,4,5] [1,2,3,4,5,1] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7,3] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7,-3] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7,-3] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7,-3] +arrayPushBack(arr1, nl) +[] [NULL] +[] [NULL] +[1,2,3,4,5] [1,2,3,4,5,NULL] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6,7,3] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6,7,-3] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL,7,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6,7,4] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6,7,-3] +arrayPushBack([1, 2, 3], l) +[1,1,1,1] +[1] +[1] +[3] +[-3] +[-3] +[4] +[-3] +arrayPushBack([1, 2, 3], nl) +[1,1,1,NULL] +[NULL] +[NULL] +[3] +[-3] +[NULL] +[4] +[-3] +arrayPopFront(arr1) +[] [] +[] [] +[1,2,3,4,5] [2,3,4,5] +[1,NULL,3,4,NULL,6,7] [NULL,3,4,NULL,6,7] +[1,2,3,NULL,5,6,7] [2,3,NULL,5,6,7] +[1,2,3,4,5,NULL,7] [2,3,4,5,NULL,7] +[1,2,3,4,5,6,7] [2,3,4,5,6,7] +[1,NULL,3,NULL,5,6,7] [NULL,3,NULL,5,6,7] +arrayPopBack(arr1) +[] [] +[] [] +[1,2,3,4,5] [1,2,3,4] +[1,NULL,3,4,NULL,6,7] [1,NULL,3,4,NULL,6] +[1,2,3,NULL,5,6,7] [1,2,3,NULL,5,6] +[1,2,3,4,5,NULL,7] [1,2,3,4,5,NULL] +[1,2,3,4,5,6,7] [1,2,3,4,5,6] +[1,NULL,3,NULL,5,6,7] [1,NULL,3,NULL,5,6] + +table +[] [] \N 1 \N 1 \N +[] ['1','2'] a b 1 \N 1 \N +['1','2','3','4','5'] ['6','7'] a \N 2 \N 1 \N +['1',NULL,'3','4',NULL,'6','7'] ['8'] a b 2 2 3 3 +['1','2','3',NULL,'5','6','7'] ['0','1'] a \N 2 \N -3 -3 +['1','2','3','4','5',NULL,'7'] ['1','2'] a b 2 \N -3 \N +['1','2','3','4','5','6','7'] ['1','2'] a \N -5 -5 4 4 +['1',NULL,'3',NULL,'5','6','7'] [] a b -5 -5 -3 -3 +concat arr1, arr2 +[] [] [] +['1','2'] [] ['1','2'] +['1','2','3','4','5','6','7'] ['1','2','3','4','5'] ['6','7'] +['1',NULL,'3','4',NULL,'6','7','8'] ['1',NULL,'3','4',NULL,'6','7'] ['8'] +['1','2','3',NULL,'5','6','7','0','1'] ['1','2','3',NULL,'5','6','7'] ['0','1'] +['1','2','3','4','5',NULL,'7','1','2'] ['1','2','3','4','5',NULL,'7'] ['1','2'] +['1','2','3','4','5','6','7','1','2'] ['1','2','3','4','5','6','7'] ['1','2'] +['1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6','7'] [] +concat arr1, arr2, arr1 +[] [] [] +['1','2'] [] ['1','2'] +['1','2','3','4','5','6','7','1','2','3','4','5'] ['1','2','3','4','5'] ['6','7'] +['1',NULL,'3','4',NULL,'6','7','8','1',NULL,'3','4',NULL,'6','7'] ['1',NULL,'3','4',NULL,'6','7'] ['8'] +['1','2','3',NULL,'5','6','7','0','1','1','2','3',NULL,'5','6','7'] ['1','2','3',NULL,'5','6','7'] ['0','1'] +['1','2','3','4','5',NULL,'7','1','2','1','2','3','4','5',NULL,'7'] ['1','2','3','4','5',NULL,'7'] ['1','2'] +['1','2','3','4','5','6','7','1','2','1','2','3','4','5','6','7'] ['1','2','3','4','5','6','7'] ['1','2'] +['1',NULL,'3',NULL,'5','6','7','1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6','7'] [] +arraySlice(arr1, o, l) +[] 1 1 [] +[] 1 1 [] +['1','2','3','4','5'] 2 1 ['2'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 [NULL,'3','4'] +['1','2','3',NULL,'5','6','7'] 2 -3 ['2','3',NULL] +['1','2','3','4','5',NULL,'7'] 2 -3 ['2','3','4'] +['1','2','3','4','5','6','7'] -5 4 ['3','4','5','6'] +['1',NULL,'3',NULL,'5','6','7'] -5 -3 ['3',NULL] +arraySlice(arr1, no, nl) +[] \N \N [] +[] \N \N [] +['1','2','3','4','5'] \N \N ['1','2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 [NULL,'3','4'] +['1','2','3',NULL,'5','6','7'] \N -3 ['1','2','3',NULL] +['1','2','3','4','5',NULL,'7'] \N \N ['1','2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] -5 4 ['3','4','5','6'] +['1',NULL,'3',NULL,'5','6','7'] -5 -3 ['3',NULL] +arraySlice(arr1, 2, l) +[] 2 1 [] +[] 2 1 [] +['1','2','3','4','5'] 2 1 ['2'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 [NULL,'3','4'] +['1','2','3',NULL,'5','6','7'] 2 -3 ['2','3',NULL] +['1','2','3','4','5',NULL,'7'] 2 -3 ['2','3','4'] +['1','2','3','4','5','6','7'] 2 4 ['2','3','4','5'] +['1',NULL,'3',NULL,'5','6','7'] 2 -3 [NULL,'3',NULL] +arraySlice(arr1, o, 2) +[] 1 2 [] +[] 1 2 [] +['1','2','3','4','5'] 2 2 ['2','3'] +['1',NULL,'3','4',NULL,'6','7'] 2 2 [NULL,'3'] +['1','2','3',NULL,'5','6','7'] 2 2 ['2','3'] +['1','2','3','4','5',NULL,'7'] 2 2 ['2','3'] +['1','2','3','4','5','6','7'] -5 2 ['3','4'] +['1',NULL,'3',NULL,'5','6','7'] -5 2 ['3',NULL] +arraySlice(arr1, 2, nl) +[] 2 \N [] +[] 2 \N [] +['1','2','3','4','5'] 2 \N ['2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 [NULL,'3','4'] +['1','2','3',NULL,'5','6','7'] 2 -3 ['2','3',NULL] +['1','2','3','4','5',NULL,'7'] 2 \N ['2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] 2 4 ['2','3','4','5'] +['1',NULL,'3',NULL,'5','6','7'] 2 -3 [NULL,'3',NULL] +arraySlice(arr1, no, 2) +[] \N 2 [] +[] \N 2 [] +['1','2','3','4','5'] \N 2 ['1','2'] +['1',NULL,'3','4',NULL,'6','7'] 2 2 [NULL,'3'] +['1','2','3',NULL,'5','6','7'] \N 2 ['1','2'] +['1','2','3','4','5',NULL,'7'] \N 2 ['1','2'] +['1','2','3','4','5','6','7'] -5 2 ['3','4'] +['1',NULL,'3',NULL,'5','6','7'] -5 2 ['3',NULL] +arraySlice(arr1, -4, l) +[] 2 1 [] +[] 2 1 [] +['1','2','3','4','5'] 2 1 ['2'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 ['4',NULL,'6'] +['1','2','3',NULL,'5','6','7'] 2 -3 [NULL] +['1','2','3','4','5',NULL,'7'] 2 -3 ['4'] +['1','2','3','4','5','6','7'] 2 4 ['4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] 2 -3 [NULL] +arraySlice(arr1, o, -2) +[] 1 2 [] +[] 1 2 [] +['1','2','3','4','5'] 2 2 ['2','3'] +['1',NULL,'3','4',NULL,'6','7'] 2 2 [NULL,'3','4',NULL] +['1','2','3',NULL,'5','6','7'] 2 2 ['2','3',NULL,'5'] +['1','2','3','4','5',NULL,'7'] 2 2 ['2','3','4','5'] +['1','2','3','4','5','6','7'] -5 2 ['3','4','5'] +['1',NULL,'3',NULL,'5','6','7'] -5 2 ['3',NULL,'5'] +arraySlice(arr1, -4, nl) +[] 2 \N [] +[] 2 \N [] +['1','2','3','4','5'] 2 \N ['2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] 2 3 ['4',NULL,'6'] +['1','2','3',NULL,'5','6','7'] 2 -3 [NULL] +['1','2','3','4','5',NULL,'7'] 2 \N ['4','5',NULL,'7'] +['1','2','3','4','5','6','7'] 2 4 ['4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] 2 -3 [NULL] +arraySlice(arr1, no, -2) +[] \N 2 [] +[] \N 2 [] +['1','2','3','4','5'] \N 2 ['1','2','3'] +['1',NULL,'3','4',NULL,'6','7'] 2 2 [NULL,'3','4',NULL] +['1','2','3',NULL,'5','6','7'] \N 2 ['1','2','3',NULL,'5'] +['1','2','3','4','5',NULL,'7'] \N 2 ['1','2','3','4','5'] +['1','2','3','4','5','6','7'] -5 2 ['3','4','5'] +['1',NULL,'3',NULL,'5','6','7'] -5 2 ['3',NULL,'5'] +arraySlice(arr1, 2, 4) +[] 2 4 [] +[] 2 4 [] +['1','2','3','4','5'] 2 4 ['2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] 2 4 [NULL,'3','4',NULL] +['1','2','3',NULL,'5','6','7'] 2 4 ['2','3',NULL,'5'] +['1','2','3','4','5',NULL,'7'] 2 4 ['2','3','4','5'] +['1','2','3','4','5','6','7'] 2 4 ['2','3','4','5'] +['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'3',NULL,'5'] +arraySlice(arr1, 2, -4) +[] 2 4 [] +[] 2 4 [] +['1','2','3','4','5'] 2 4 [] +['1',NULL,'3','4',NULL,'6','7'] 2 4 [NULL,'3'] +['1','2','3',NULL,'5','6','7'] 2 4 ['2','3'] +['1','2','3','4','5',NULL,'7'] 2 4 ['2','3'] +['1','2','3','4','5','6','7'] 2 4 ['2','3'] +['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'3'] +arraySlice(arr1, -4, 2) +[] 2 4 [] +[] 2 4 [] +['1','2','3','4','5'] 2 4 ['2','3'] +['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL] +['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5'] +['1','2','3','4','5',NULL,'7'] 2 4 ['4','5'] +['1','2','3','4','5','6','7'] 2 4 ['4','5'] +['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5'] +arraySlice(arr1, -4, -1) +[] 2 4 [] +[] 2 4 [] +['1','2','3','4','5'] 2 4 [] +['1',NULL,'3','4',NULL,'6','7'] 2 4 ['4',NULL] +['1','2','3',NULL,'5','6','7'] 2 4 [NULL,'5'] +['1','2','3','4','5',NULL,'7'] 2 4 ['4','5'] +['1','2','3','4','5','6','7'] 2 4 ['4','5'] +['1',NULL,'3',NULL,'5','6','7'] 2 4 [NULL,'5'] +arrayPushFront(arr1, 1) +[] ['1'] +[] ['1'] +['1','2','3','4','5'] ['1','1','2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] ['1','1',NULL,'3','4',NULL,'6','7'] +['1','2','3',NULL,'5','6','7'] ['1','1','2','3',NULL,'5','6','7'] +['1','2','3','4','5',NULL,'7'] ['1','1','2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] ['1','1','2','3','4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] ['1','1',NULL,'3',NULL,'5','6','7'] +arrayPushFront(arr1, val) +[] [''] +[] ['a'] +['1','2','3','4','5'] ['a','1','2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] ['a','1',NULL,'3','4',NULL,'6','7'] +['1','2','3',NULL,'5','6','7'] ['a','1','2','3',NULL,'5','6','7'] +['1','2','3','4','5',NULL,'7'] ['a','1','2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] ['a','1','2','3','4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] ['a','1',NULL,'3',NULL,'5','6','7'] +arrayPushFront(arr1, val2) +[] [NULL] +[] ['b'] +['1','2','3','4','5'] [NULL,'1','2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] ['b','1',NULL,'3','4',NULL,'6','7'] +['1','2','3',NULL,'5','6','7'] [NULL,'1','2','3',NULL,'5','6','7'] +['1','2','3','4','5',NULL,'7'] ['b','1','2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] [NULL,'1','2','3','4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] ['b','1',NULL,'3',NULL,'5','6','7'] +arrayPushFront([a, b, c], val) +['','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +['a','a','b','c'] +arrayPushFront([a, b, c], val2) +[NULL,'a','b','c'] +['b','a','b','c'] +[NULL,'a','b','c'] +['b','a','b','c'] +[NULL,'a','b','c'] +['b','a','b','c'] +[NULL,'a','b','c'] +['b','a','b','c'] +arrayPushBack(arr1, 1) +[] ['1'] +[] ['1'] +['1','2','3','4','5'] ['1','2','3','4','5','1'] +['1',NULL,'3','4',NULL,'6','7'] ['1',NULL,'3','4',NULL,'6','7','1'] +['1','2','3',NULL,'5','6','7'] ['1','2','3',NULL,'5','6','7','1'] +['1','2','3','4','5',NULL,'7'] ['1','2','3','4','5',NULL,'7','1'] +['1','2','3','4','5','6','7'] ['1','2','3','4','5','6','7','1'] +['1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6','7','1'] +arrayPushBack(arr1, val) +[] [''] +[] ['a'] +['1','2','3','4','5'] ['1','2','3','4','5','a'] +['1',NULL,'3','4',NULL,'6','7'] ['1',NULL,'3','4',NULL,'6','7','a'] +['1','2','3',NULL,'5','6','7'] ['1','2','3',NULL,'5','6','7','a'] +['1','2','3','4','5',NULL,'7'] ['1','2','3','4','5',NULL,'7','a'] +['1','2','3','4','5','6','7'] ['1','2','3','4','5','6','7','a'] +['1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6','7','a'] +arrayPushBack(arr1, val2) +[] [NULL] +[] ['b'] +['1','2','3','4','5'] ['1','2','3','4','5',NULL] +['1',NULL,'3','4',NULL,'6','7'] ['1',NULL,'3','4',NULL,'6','7','b'] +['1','2','3',NULL,'5','6','7'] ['1','2','3',NULL,'5','6','7',NULL] +['1','2','3','4','5',NULL,'7'] ['1','2','3','4','5',NULL,'7','b'] +['1','2','3','4','5','6','7'] ['1','2','3','4','5','6','7',NULL] +['1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6','7','b'] +arrayPushBack([a, b, c], val) +['a','b','c',''] +['a','b','c','a'] +['a','b','c','a'] +['a','b','c','a'] +['a','b','c','a'] +['a','b','c','a'] +['a','b','c','a'] +['a','b','c','a'] +arrayPushBack([a, b, c], val2) +['a','b','c',NULL] +['a','b','c','b'] +['a','b','c',NULL] +['a','b','c','b'] +['a','b','c',NULL] +['a','b','c','b'] +['a','b','c',NULL] +['a','b','c','b'] +arrayPopFront(arr1) +[] [] +[] [] +['1','2','3','4','5'] ['2','3','4','5'] +['1',NULL,'3','4',NULL,'6','7'] [NULL,'3','4',NULL,'6','7'] +['1','2','3',NULL,'5','6','7'] ['2','3',NULL,'5','6','7'] +['1','2','3','4','5',NULL,'7'] ['2','3','4','5',NULL,'7'] +['1','2','3','4','5','6','7'] ['2','3','4','5','6','7'] +['1',NULL,'3',NULL,'5','6','7'] [NULL,'3',NULL,'5','6','7'] +arrayPopBack(arr1) +[] [] +[] [] +['1','2','3','4','5'] ['1','2','3','4'] +['1',NULL,'3','4',NULL,'6','7'] ['1',NULL,'3','4',NULL,'6'] +['1','2','3',NULL,'5','6','7'] ['1','2','3',NULL,'5','6'] +['1','2','3','4','5',NULL,'7'] ['1','2','3','4','5',NULL] +['1','2','3','4','5','6','7'] ['1','2','3','4','5','6'] +['1',NULL,'3',NULL,'5','6','7'] ['1',NULL,'3',NULL,'5','6'] diff --git a/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.sql b/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.sql new file mode 100644 index 00000000000..7465fc2c731 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00498_array_functions_concat_slice_push_pop.sql @@ -0,0 +1,366 @@ +select 'const args'; +select 'concat'; +select arrayConcat(emptyArrayUInt8()); +select arrayConcat(emptyArrayUInt8(), emptyArrayUInt8()); +select arrayConcat(emptyArrayUInt8(), emptyArrayUInt8(), emptyArrayUInt8()); +select arrayConcat([Null], emptyArrayUInt8()); +select arrayConcat([Null], emptyArrayUInt8(), [1]); +select arrayConcat([1, 2], [-1, -2], [0.3, 0.7], [Null]); +select arrayConcat(Null, emptyArrayUInt8()); +select arrayConcat([1], [-1], Null); +select arrayConcat([1, 2], [3, 4]); +select arrayConcat([1], [2, 3, 4]); +select arrayConcat(emptyArrayUInt8(), emptyArrayUInt8()); +SELECT arrayConcat(['abc'], ['def', 'gh', 'qwe']); +SELECT arrayConcat([1, NULL, 2], [3, NULL, 4]); +select arrayConcat([1, Null, 2], [3, 4]); + +select 'slice'; +select arraySlice(Null, 1, 2); +select arraySlice([1, 2, 3, 4, 5, 6], Null, Null); +select arraySlice([1, 2, 3, 4, 5, 6], 2, Null); +select arraySlice([1, 2, 3, 4, 5, 6], Null, 4); +select arraySlice([1, 2, 3, 4, 5, 6], Null, -2); +select arraySlice([1, 2, 3, 4, 5, 6], -3, Null); +select arraySlice([1, 2, 3, 4, 5, 6], 2, 3); +select arraySlice([1, 2, 3, 4, 5, 6], 2, -2); +select arraySlice([1, 2, 3, 4, 5, 6], -4, 2); +select arraySlice([1, 2, 3, 4, 5, 6], -4, -2); +select arraySlice([1, 2, 3, 4, 5, 6], 2, 0); +select arraySlice([1, 2, 3, 4, 5, 6], -10, 15); +select arraySlice([1, 2, 3, 4, 5, 6], 10, 0); +select arraySlice([1, 2, 3, 4, 5, 6], 10, -1); +select arraySlice([1, 2, 3, 4, 5, 6], 10, 1); +select arraySlice([1, 2, Null, 4, 5, 6], 2, 4); +select arraySlice(['a', 'b', 'c', 'd', 'e'], 2, 3); +select arraySlice([Null, 'b', Null, 'd', 'e'], 2, 3); + +select 'push back'; +select arrayPushBack(Null, 1); +select arrayPushBack([1], 1); +select arrayPushBack([Null], 1); +select arrayPushBack([0.5, 0.7], 1); +select arrayPushBack([1], -1); +select arrayPushBack(['a', 'b'], 'cd'); +select arrayPushBack(emptyArrayUInt8(), 1); +select arrayPushBack(emptyArrayUInt8(), -1); + +select 'push front'; +select arrayPushFront(Null, 1); +select arrayPushFront([1], 1); +select arrayPushFront([Null], 1); +select arrayPushFront([0.5, 0.7], 1); +select arrayPushFront([1], -1); +select arrayPushFront(['a', 'b'], 'cd'); +select arrayPushFront(emptyArrayUInt8(), 1); +select arrayPushFront(emptyArrayUInt8(), -1); + +select 'pop back'; +select arrayPopBack(Null); +select arrayPopBack(emptyArrayUInt8()); +select arrayPopBack([1]); +select arrayPopBack([1, 2, 3]); +select arrayPopBack([0.1, 0.2, 0.3]); +select arrayPopBack(['a', 'b', 'c']); + +select 'pop front'; +select arrayPopFront(Null); +select arrayPopFront(emptyArrayUInt8()); +select arrayPopFront([1]); +select arrayPopFront([1, 2, 3]); +select arrayPopFront([0.1, 0.2, 0.3]); +select arrayPopFront(['a', 'b', 'c']); + +DROP TABLE if exists test_array_functions; +select ''; +select 'table'; +create table test_array_functions (arr1 Array(Int8), arr2 Array(Int8), o Int8, no Nullable(Int8), l Int8, nl Nullable(Int8)) engine = TinyLog; +insert into test_array_functions values ([], [], 1, Null, 1, Null), ([], [1], 1, Null, 1, Null), ([1, 2, 3, 4, 5], [6, 7], 2, Null, 1, Null), ([1, 2, 3, 4, 5, 6, 7], [8], 2, 2, 3, 3), ([1, 2, 3, 4, 5, 6, 7], [], 2, Null, -3, -3), ([1, 2, 3, 4, 5, 6, 7], [], 2, Null, -3, Null), ([1, 2, 3, 4, 5, 6, 7], [], -5, -5, 4, 4), ([1, 2, 3, 4, 5, 6, 7], [], -5, -5, -3, -3); + +select * from test_array_functions; +select 'concat arr1, arr2'; +select arrayConcat(arr1, arr2), arr1, arr2 from test_array_functions; +select 'concat arr1, arr2, arr1'; +select arrayConcat(arr1, arr2, arr1), arr1, arr2 from test_array_functions; + +select 'arraySlice(arr1, o, l)'; +select arr1, o, l, arraySlice(arr1, o, l) from test_array_functions; +select 'arraySlice(arr1, no, nl)'; +select arr1, no, nl, arraySlice(arr1, no, nl) from test_array_functions; +select 'arraySlice(arr1, 2, l)'; +select arr1, 2, l, arraySlice(arr1, 2, l) from test_array_functions; +select 'arraySlice(arr1, o, 2)'; +select arr1, o, 2, arraySlice(arr1, o, 2) from test_array_functions; +select 'arraySlice(arr1, 2, nl)'; +select arr1, 2, nl, arraySlice(arr1, 2, nl) from test_array_functions; +select 'arraySlice(arr1, no, 2)'; +select arr1, no, 2, arraySlice(arr1, no, 2) from test_array_functions; +select 'arraySlice(arr1, -4, l)'; +select arr1, 2, l, arraySlice(arr1, -4, l) from test_array_functions; +select 'arraySlice(arr1, o, -2)'; +select arr1, o, 2, arraySlice(arr1, o, -2) from test_array_functions; +select 'arraySlice(arr1, -4, nl)'; +select arr1, 2, nl, arraySlice(arr1, -4, nl) from test_array_functions; +select 'arraySlice(arr1, no, -2)'; +select arr1, no, 2, arraySlice(arr1, no, -2) from test_array_functions; +select 'arraySlice(arr1, 2, 4)'; +select arr1, 2, 4, arraySlice(arr1, 2, 4) from test_array_functions; +select 'arraySlice(arr1, 2, -4)'; +select arr1, 2, 4, arraySlice(arr1, 2, -4) from test_array_functions; +select 'arraySlice(arr1, -4, 2)'; +select arr1, 2, 4, arraySlice(arr1, -4, 2) from test_array_functions; +select 'arraySlice(arr1, -4, -1)'; +select arr1, 2, 4, arraySlice(arr1, -4, -1) from test_array_functions; + +select 'arrayPushFront(arr1, 1)'; +select arr1, arrayPushFront(arr1, 1) from test_array_functions; +select 'arrayPushFront(arr1, 0.1)'; +select arr1, arrayPushFront(arr1, 0.1) from test_array_functions; +select 'arrayPushFront(arr1, l)'; +select arr1, arrayPushFront(arr1, l) from test_array_functions; +select 'arrayPushFront(arr1, nl)'; +select arr1, arrayPushFront(arr1, nl) from test_array_functions; +select 'arrayPushFront([1, 2, 3], l)'; +select arrayPushFront([1, 2, 3], l) from test_array_functions; +select 'arrayPushFront([1, 2, 3], nl)' from test_array_functions; +select arrayPushFront([1, 2, 3], nl) from test_array_functions; + +select 'arrayPushBack(arr1, 1)'; +select arr1, arrayPushBack(arr1, 1) from test_array_functions; +select 'arrayPushBack(arr1, 0.1)'; +select arr1, arrayPushBack(arr1, 0.1) from test_array_functions; +select 'arrayPushBack(arr1, l)'; +select arr1, arrayPushBack(arr1, l) from test_array_functions; +select 'arrayPushBack(arr1, nl)'; +select arr1, arrayPushBack(arr1, nl) from test_array_functions; +select 'arrayPushBack([1, 2, 3], l)'; +select arrayPushBack([1, 2, 3], l) from test_array_functions; +select 'arrayPushBack([1, 2, 3], nl)'; +select arrayPushBack([1, 2, 3], nl) from test_array_functions; + +select 'arrayPopFront(arr1)'; +select arr1, arrayPopFront(arr1) from test_array_functions; +select 'arrayPopBack(arr1)'; +select arr1, arrayPopBack(arr1) from test_array_functions; + + +DROP TABLE if exists test_array_functions; +select ''; +select 'table'; +create table test_array_functions (arr1 Array(Nullable(Int8)), arr2 Array(Nullable(Float32)), o Int8, no Nullable(Int8), l Int8, nl Nullable(Int8)) engine = TinyLog; +insert into test_array_functions values ([], [], 1, Null, 1, Null), ([], [1, Null], 1, Null, 1, Null), ([1, 2, 3, 4, 5], [6, Null], 2, Null, 1, Null), ([1, Null, 3, 4, Null, 6, 7], [8], 2, 2, 3, 3),([1, 2, 3, Null, 5, 6, 7], [Null, 1], 2, Null, -3, -3),([1, 2, 3, 4, 5, Null, 7], [1, Null], 2, Null, -3, Null), ([1, 2, 3, 4, 5, 6, 7], [1, 2], -5, -5, 4, 4),([1, Null, 3, Null, 5, 6, 7], [], -5, -5, -3, -3); + +select * from test_array_functions; +select 'concat arr1, arr2'; +select arrayConcat(arr1, arr2), arr1, arr2 from test_array_functions; +select 'concat arr1, arr2, arr1'; +select arrayConcat(arr1, arr2, arr1), arr1, arr2 from test_array_functions; + +select 'arraySlice(arr1, o, l)'; +select arr1, o, l, arraySlice(arr1, o, l) from test_array_functions; +select 'arraySlice(arr1, no, nl)'; +select arr1, no, nl, arraySlice(arr1, no, nl) from test_array_functions; +select 'arraySlice(arr1, 2, l)'; +select arr1, 2, l, arraySlice(arr1, 2, l) from test_array_functions; +select 'arraySlice(arr1, o, 2)'; +select arr1, o, 2, arraySlice(arr1, o, 2) from test_array_functions; +select 'arraySlice(arr1, 2, nl)'; +select arr1, 2, nl, arraySlice(arr1, 2, nl) from test_array_functions; +select 'arraySlice(arr1, no, 2)'; +select arr1, no, 2, arraySlice(arr1, no, 2) from test_array_functions; +select 'arraySlice(arr1, -4, l)'; +select arr1, 2, l, arraySlice(arr1, -4, l) from test_array_functions; +select 'arraySlice(arr1, o, -2)'; +select arr1, o, 2, arraySlice(arr1, o, -2) from test_array_functions; +select 'arraySlice(arr1, -4, nl)'; +select arr1, 2, nl, arraySlice(arr1, -4, nl) from test_array_functions; +select 'arraySlice(arr1, no, -2)'; +select arr1, no, 2, arraySlice(arr1, no, -2) from test_array_functions; +select 'arraySlice(arr1, 2, 4)'; +select arr1, 2, 4, arraySlice(arr1, 2, 4) from test_array_functions; +select 'arraySlice(arr1, 2, -4)'; +select arr1, 2, 4, arraySlice(arr1, 2, -4) from test_array_functions; +select 'arraySlice(arr1, -4, 2)'; +select arr1, 2, 4, arraySlice(arr1, -4, 2) from test_array_functions; +select 'arraySlice(arr1, -4, -1)'; +select arr1, 2, 4, arraySlice(arr1, -4, -1) from test_array_functions; + +select 'arrayPushFront(arr1, 1)'; +select arr1, arrayPushFront(arr1, 1) from test_array_functions; +select 'arrayPushFront(arr1, 0.1)'; +select arr1, arrayPushFront(arr1, 0.1) from test_array_functions; +select 'arrayPushFront(arr1, l)'; +select arr1, arrayPushFront(arr1, l) from test_array_functions; +select 'arrayPushFront(arr1, nl)'; +select arr1, arrayPushFront(arr1, nl) from test_array_functions; +select 'arrayPushFront([1, 2, 3], l)'; +select arrayPushFront([1, 2, 3], l) from test_array_functions; +select 'arrayPushFront([1, 2, 3], nl)' from test_array_functions; +select arrayPushFront([1, 2, 3], nl) from test_array_functions; + +select 'arrayPushBack(arr1, 1)'; +select arr1, arrayPushBack(arr1, 1) from test_array_functions; +select 'arrayPushBack(arr1, 0.1)'; +select arr1, arrayPushBack(arr1, 0.1) from test_array_functions; +select 'arrayPushBack(arr1, l)'; +select arr1, arrayPushBack(arr1, l) from test_array_functions; +select 'arrayPushBack(arr1, nl)'; +select arr1, arrayPushBack(arr1, nl) from test_array_functions; +select 'arrayPushBack([1, 2, 3], l)'; +select arrayPushBack([1, 2, 3], l) from test_array_functions; +select 'arrayPushBack([1, 2, 3], nl)'; +select arrayPushBack([1, 2, 3], nl) from test_array_functions; + +select 'arrayPopFront(arr1)'; +select arr1, arrayPopFront(arr1) from test_array_functions; +select 'arrayPopBack(arr1)'; +select arr1, arrayPopBack(arr1) from test_array_functions; + + +DROP TABLE if exists test_array_functions; +select ''; +select 'table'; +create table test_array_functions (arr1 Array(Nullable(Int8)), arr2 Array(UInt8), o Int8, no Nullable(Int8), l Int8, nl Nullable(Int8)) engine = TinyLog; +insert into test_array_functions values ([], [], 1, Null, 1, Null), ([], [1, 2], 1, Null, 1, Null), ([1, 2, 3, 4, 5], [6, 7], 2, Null, 1, Null), ([1, Null,3,4, Null, 6, 7], [8], 2, 2, 3, 3),([1, 2, 3, Null, 5, 6, 7], [0, 1], 2, Null, -3, -3),([1, 2, 3, 4, 5, Null, 7], [1, 2], 2, Null, -3, Null),([1, 2, 3,4, 5, 6, 7], [1, 2], -5, -5, 4, 4),([1, Null, 3, Null, 5, 6, 7], [], -5, -5, -3, -3); + +select * from test_array_functions; +select 'concat arr1, arr2'; +select arrayConcat(arr1, arr2), arr1, arr2 from test_array_functions; +select 'concat arr1, arr2, arr1'; +select arrayConcat(arr1, arr2, arr1), arr1, arr2 from test_array_functions; + + +select * from test_array_functions; +select 'concat arr1, arr2'; +select arrayConcat(arr1, arr2), arr1, arr2 from test_array_functions; +select 'concat arr1, arr2, arr1'; +select arrayConcat(arr1, arr2, arr1), arr1, arr2 from test_array_functions; + +select 'arraySlice(arr1, o, l)'; +select arr1, o, l, arraySlice(arr1, o, l) from test_array_functions; +select 'arraySlice(arr1, no, nl)'; +select arr1, no, nl, arraySlice(arr1, no, nl) from test_array_functions; +select 'arraySlice(arr1, 2, l)'; +select arr1, 2, l, arraySlice(arr1, 2, l) from test_array_functions; +select 'arraySlice(arr1, o, 2)'; +select arr1, o, 2, arraySlice(arr1, o, 2) from test_array_functions; +select 'arraySlice(arr1, 2, nl)'; +select arr1, 2, nl, arraySlice(arr1, 2, nl) from test_array_functions; +select 'arraySlice(arr1, no, 2)'; +select arr1, no, 2, arraySlice(arr1, no, 2) from test_array_functions; +select 'arraySlice(arr1, -4, l)'; +select arr1, 2, l, arraySlice(arr1, -4, l) from test_array_functions; +select 'arraySlice(arr1, o, -2)'; +select arr1, o, 2, arraySlice(arr1, o, -2) from test_array_functions; +select 'arraySlice(arr1, -4, nl)'; +select arr1, 2, nl, arraySlice(arr1, -4, nl) from test_array_functions; +select 'arraySlice(arr1, no, -2)'; +select arr1, no, 2, arraySlice(arr1, no, -2) from test_array_functions; +select 'arraySlice(arr1, 2, 4)'; +select arr1, 2, 4, arraySlice(arr1, 2, 4) from test_array_functions; +select 'arraySlice(arr1, 2, -4)'; +select arr1, 2, 4, arraySlice(arr1, 2, -4) from test_array_functions; +select 'arraySlice(arr1, -4, 2)'; +select arr1, 2, 4, arraySlice(arr1, -4, 2) from test_array_functions; +select 'arraySlice(arr1, -4, -1)'; +select arr1, 2, 4, arraySlice(arr1, -4, -1) from test_array_functions; + +select 'arrayPushFront(arr1, 1)'; +select arr1, arrayPushFront(arr1, 1) from test_array_functions; +select 'arrayPushFront(arr1, 0.1)'; +select arr1, arrayPushFront(arr1, 0.1) from test_array_functions; +select 'arrayPushFront(arr1, l)'; +select arr1, arrayPushFront(arr1, l) from test_array_functions; +select 'arrayPushFront(arr1, nl)'; +select arr1, arrayPushFront(arr1, nl) from test_array_functions; +select 'arrayPushFront([1, 2, 3], l)'; +select arrayPushFront([1, 2, 3], l) from test_array_functions; +select 'arrayPushFront([1, 2, 3], nl)' from test_array_functions; +select arrayPushFront([1, 2, 3], nl) from test_array_functions; + +select 'arrayPushBack(arr1, 1)'; +select arr1, arrayPushBack(arr1, 1) from test_array_functions; +select 'arrayPushBack(arr1, 0.1)'; +select arr1, arrayPushBack(arr1, 0.1) from test_array_functions; +select 'arrayPushBack(arr1, l)'; +select arr1, arrayPushBack(arr1, l) from test_array_functions; +select 'arrayPushBack(arr1, nl)'; +select arr1, arrayPushBack(arr1, nl) from test_array_functions; +select 'arrayPushBack([1, 2, 3], l)'; +select arrayPushBack([1, 2, 3], l) from test_array_functions; +select 'arrayPushBack([1, 2, 3], nl)'; +select arrayPushBack([1, 2, 3], nl) from test_array_functions; + +select 'arrayPopFront(arr1)'; +select arr1, arrayPopFront(arr1) from test_array_functions; +select 'arrayPopBack(arr1)'; +select arr1, arrayPopBack(arr1) from test_array_functions; + +DROP TABLE if exists test_array_functions; +select ''; +select 'table'; +create table test_array_functions (arr1 Array(Nullable(String)), arr2 Array(String), val String, val2 Nullable(String), o Int8, no Nullable(Int8), l Int8, nl Nullable(Int8)) engine = TinyLog; +insert into test_array_functions values ([], [], '', Null, 1, Null, 1, Null), ([], ['1', '2'], 'a', 'b', 1, Null, 1, Null), (['1', '2', '3', '4', '5'], ['6','7'], 'a', Null, 2, Null, 1, Null), (['1', Null, '3', '4', Null, '6', '7'], ['8'], 'a', 'b', 2, 2, 3, 3),(['1', '2', '3', Null, '5', '6', '7'], ['0','1'], 'a', Null, 2, Null, -3, -3),(['1', '2', '3', '4', '5', Null, '7'], ['1', '2'], 'a', 'b', 2, Null, -3, Null),(['1', '2', '3', '4', '5', '6', '7'],['1', '2'], 'a', Null, -5, -5, 4, 4),(['1', Null, '3', Null, '5', '6', '7'], [], 'a', 'b', -5, -5, -3, -3); + + +select * from test_array_functions; +select 'concat arr1, arr2'; +select arrayConcat(arr1, arr2), arr1, arr2 from test_array_functions; +select 'concat arr1, arr2, arr1'; +select arrayConcat(arr1, arr2, arr1), arr1, arr2 from test_array_functions; + +select 'arraySlice(arr1, o, l)'; +select arr1, o, l, arraySlice(arr1, o, l) from test_array_functions; +select 'arraySlice(arr1, no, nl)'; +select arr1, no, nl, arraySlice(arr1, no, nl) from test_array_functions; +select 'arraySlice(arr1, 2, l)'; +select arr1, 2, l, arraySlice(arr1, 2, l) from test_array_functions; +select 'arraySlice(arr1, o, 2)'; +select arr1, o, 2, arraySlice(arr1, o, 2) from test_array_functions; +select 'arraySlice(arr1, 2, nl)'; +select arr1, 2, nl, arraySlice(arr1, 2, nl) from test_array_functions; +select 'arraySlice(arr1, no, 2)'; +select arr1, no, 2, arraySlice(arr1, no, 2) from test_array_functions; +select 'arraySlice(arr1, -4, l)'; +select arr1, 2, l, arraySlice(arr1, -4, l) from test_array_functions; +select 'arraySlice(arr1, o, -2)'; +select arr1, o, 2, arraySlice(arr1, o, -2) from test_array_functions; +select 'arraySlice(arr1, -4, nl)'; +select arr1, 2, nl, arraySlice(arr1, -4, nl) from test_array_functions; +select 'arraySlice(arr1, no, -2)'; +select arr1, no, 2, arraySlice(arr1, no, -2) from test_array_functions; +select 'arraySlice(arr1, 2, 4)'; +select arr1, 2, 4, arraySlice(arr1, 2, 4) from test_array_functions; +select 'arraySlice(arr1, 2, -4)'; +select arr1, 2, 4, arraySlice(arr1, 2, -4) from test_array_functions; +select 'arraySlice(arr1, -4, 2)'; +select arr1, 2, 4, arraySlice(arr1, -4, 2) from test_array_functions; +select 'arraySlice(arr1, -4, -1)'; +select arr1, 2, 4, arraySlice(arr1, -4, -1) from test_array_functions; + +select 'arrayPushFront(arr1, 1)'; +select arr1, arrayPushFront(arr1, '1') from test_array_functions; +select 'arrayPushFront(arr1, val)'; +select arr1, arrayPushFront(arr1, val) from test_array_functions; +select 'arrayPushFront(arr1, val2)'; +select arr1, arrayPushFront(arr1, val2) from test_array_functions; +select 'arrayPushFront([a, b, c], val)'; +select arrayPushFront(['a', 'b', 'c'], val) from test_array_functions; +select 'arrayPushFront([a, b, c], val2)'; +select arrayPushFront(['a', 'b', 'c'], val2) from test_array_functions; + +select 'arrayPushBack(arr1, 1)'; +select arr1, arrayPushBack(arr1, '1') from test_array_functions; +select 'arrayPushBack(arr1, val)'; +select arr1, arrayPushBack(arr1, val) from test_array_functions; +select 'arrayPushBack(arr1, val2)'; +select arr1, arrayPushBack(arr1, val2) from test_array_functions; +select 'arrayPushBack([a, b, c], val)'; +select arrayPushBack(['a', 'b', 'c'], val) from test_array_functions; +select 'arrayPushBack([a, b, c], val2)'; +select arrayPushBack(['a', 'b', 'c'], val2) from test_array_functions; + +select 'arrayPopFront(arr1)'; +select arr1, arrayPopFront(arr1) from test_array_functions; +select 'arrayPopBack(arr1)'; +select arr1, arrayPopBack(arr1) from test_array_functions;