@@ -1832,18 +1832,33 @@ select array_positions(['h', 'e', 'l', 'l', 'o'], 'l'), array_positions([1, 2, 3
18321832----
18331833[3, 4] [5] [1, 2, 3]
18341834
1835+ query ???
1836+ select array_positions(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), 'l'), array_positions(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), 5), array_positions(arrow_cast([1, 1, 1], 'LargeList(Int64)'), 1);
1837+ ----
1838+ [3, 4] [5] [1, 2, 3]
1839+ 
18351840# array_positions scalar function #2 (element is list)
18361841query ?
18371842select array_positions(make_array([1, 2, 3], [2, 1, 3], [1, 5, 6], [2, 1, 3], [4, 5, 6]), [2, 1, 3]);
18381843----
18391844[2, 4]
18401845
1846+ query ?
1847+ select array_positions(arrow_cast(make_array([1, 2, 3], [2, 1, 3], [1, 5, 6], [2, 1, 3], [4, 5, 6]), 'LargeList(List(Int64))'), [2, 1, 3]);
1848+ ----
1849+ [2, 4]
1850+ 
18411851# list_positions scalar function #3 (function alias `array_positions`)
18421852query ???
18431853select list_positions(['h', 'e', 'l', 'l', 'o'], 'l'), list_positions([1, 2, 3, 4, 5], 5), list_positions([1, 1, 1], 1);
18441854----
18451855[3, 4] [5] [1, 2, 3]
18461856
1857+ query ???
1858+ select list_positions(arrow_cast(['h', 'e', 'l', 'l', 'o'], 'LargeList(Utf8)'), 'l'), list_positions(arrow_cast([1, 2, 3, 4, 5], 'LargeList(Int64)'), 5), list_positions(arrow_cast([1, 1, 1], 'LargeList(Int64)'), 1);
1859+ ----
1860+ [3, 4] [5] [1, 2, 3]
1861+ 
18471862# array_positions with columns #1
18481863query ?
18491864select array_positions(column1, column2) from arrays_values_without_nulls;
@@ -1853,13 +1868,27 @@ select array_positions(column1, column2) from arrays_values_without_nulls;
18531868[3]
18541869[4]
18551870
1871+ query ?
1872+ select array_positions(arrow_cast(column1, 'LargeList(Int64)'), column2) from arrays_values_without_nulls;
1873+ ----
1874+ [1]
1875+ [2]
1876+ [3]
1877+ [4]
1878+ 
18561879# array_positions with columns #2 (element is list)
18571880query ?
18581881select array_positions(column1, column2) from nested_arrays;
18591882----
18601883[3]
18611884[2, 5]
18621885
1886+ query ?
1887+ select array_positions(arrow_cast(column1, 'LargeList(List(Int64))'), column2) from nested_arrays;
1888+ ----
1889+ [3]
1890+ [2, 5]
1891+ 
18631892# array_positions with columns and scalars #1
18641893query ??
18651894select array_positions(column1, 4), array_positions(array[1, 2, 23, 13, 33, 45], column2) from arrays_values_without_nulls;
@@ -1869,13 +1898,27 @@ select array_positions(column1, 4), array_positions(array[1, 2, 23, 13, 33, 45],
18691898[] [3]
18701899[] []
18711900
1901+ query ??
1902+ select array_positions(arrow_cast(column1, 'LargeList(Int64)'), 4), array_positions(array[1, 2, 23, 13, 33, 45], column2) from arrays_values_without_nulls;
1903+ ----
1904+ [4] [1]
1905+ [] []
1906+ [] [3]
1907+ [] []
1908+ 
18721909# array_positions with columns and scalars #2 (element is list)
18731910query ??
18741911select array_positions(column1, make_array(4, 5, 6)), array_positions(make_array([1, 2, 3], [11, 12, 13], [4, 5, 6]), column2) from nested_arrays;
18751912----
18761913[6] []
18771914[1] []
18781915
1916+ query ??
1917+ select array_positions(arrow_cast(column1, 'LargeList(List(Int64))'), make_array(4, 5, 6)), array_positions(arrow_cast(make_array([1, 2, 3], [11, 12, 13], [4, 5, 6]), 'LargeList(List(Int64))'), column2) from nested_arrays;
1918+ ----
1919+ [6] []
1920+ [1] []
1921+ 
18791922## array_replace (aliases: `list_replace`)
18801923
18811924# array_replace scalar function #1
0 commit comments