@@ -61,17 +61,18 @@ select array_prepend(1, make_array(2, 3, 4)), array_prepend(1.0, make_array(2.0,
6161----
6262[1, 2, 3, 4] [1.0, 2.0, 3.0, 4.0] [h, e, l, l, o]
6363
64+ # TODO: issue https://github.com/apache/arrow-datafusion/issues/6596
6465# array_fill scalar function #1
65- query ??? rowsort
66+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
67+ caused by
68+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
6669select array_fill(11, make_array(1, 2, 3)), array_fill(3, make_array(2, 3)), array_fill(2, make_array(2));
67- ----
68- [[[11, 11, 11], [11, 11, 11]]] [[3, 3, 3], [3, 3, 3]] [2, 2]
6970
7071# array_fill scalar function #2
71- query ?? rowsort
72+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
73+ caused by
74+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
7275select array_fill(1, make_array(1, 1, 1)), array_fill(2, make_array(2, 2, 2, 2, 2));
73- ----
74- [[[1]]] [[[[[2, 2], [2, 2]], [[2, 2], [2, 2]]], [[[2, 2], [2, 2]], [[2, 2], [2, 2]]]], [[[[2, 2], [2, 2]], [[2, 2], [2, 2]]], [[[2, 2], [2, 2]], [[2, 2], [2, 2]]]]]
7576
7677# array_concat scalar function #1
7778query ?? rowsort
@@ -110,10 +111,10 @@ select array_position(['h', 'e', 'l', 'l', 'o'], 'l', 4), array_position([1, 2,
1101114 5 2
111112
112113# array_positions scalar function
113- query III
114+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
115+ caused by
116+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: UInt8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to UInt8
114117select array_positions(['h', 'e', 'l', 'l', 'o'], 'l'), array_positions([1, 2, 3, 4, 5], 5), array_positions([1, 1, 1], 1);
115- ----
116- [3, 4] [5] [1, 2, 3]
117118
118119# array_replace scalar function
119120query ???
@@ -122,16 +123,16 @@ select array_replace(make_array(1, 2, 3, 4), 2, 3), array_replace(make_array(1,
122123[1, 3, 3, 4] [1, 0, 0, 5, 0, 6, 7] [1, 2, 3]
123124
124125# array_to_string scalar function
125- query ???
126+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
127+ caused by
128+ Arrow error: Cast error: Cannot cast string '1\-2\-3\-4\-5' to value of Int64 type
126129select array_to_string(['h', 'e', 'l', 'l', 'o'], ','), array_to_string([1, 2, 3, 4, 5], '-'), array_to_string([1.0, 2.0, 3.0], '|');
127- ----
128- h,e,l,l,o 1-2-3-4-5 1|2|3
129130
130131# array_to_string scalar function #2
131- query ???
132+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
133+ caused by
134+ Arrow error: Cast error: Cannot cast string '1\+2\+3\+4\+5\+6' to value of Int64 type
132135select array_to_string([1, 1, 1], '1'), array_to_string([[1, 2], [3, 4], [5, 6]], '+'), array_to_string(array_fill(3, [3, 2, 2]), '/\');
133- ----
134- 11111 1+2+3+4+5+6 3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3
135136
136137# cardinality scalar function
137138query III
@@ -140,10 +141,10 @@ select cardinality(make_array(1, 2, 3, 4, 5)), cardinality([1, 3, 5]), cardinali
1401415 3 5
141142
142143# cardinality scalar function #2
143- query II
144+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
145+ caused by
146+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
144147select cardinality(make_array([1, 2], [3, 4], [5, 6])), cardinality(array_fill(3, array[3, 2, 3]));
145- ----
146- 6 18
147148
148149# trim_array scalar function
149150query ???
@@ -152,10 +153,10 @@ select trim_array(make_array(1, 2, 3, 4, 5), 2), trim_array(['h', 'e', 'l', 'l',
152153[1, 2, 3] [h, e] [1.0]
153154
154155# trim_array scalar function #2
155- query ??
156+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
157+ caused by
158+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
156159select trim_array([[1, 2], [3, 4], [5, 6]], 2), trim_array(array_fill(4, [3, 4, 2]), 2);
157- ----
158- [[1, 2]] [[[4, 4], [4, 4], [4, 4], [4, 4]]]
159160
160161# array_length scalar function
161162query III rowsort
@@ -176,22 +177,22 @@ select array_length(make_array(1, 2, 3, 4, 5), 2), array_length(make_array(1, 2,
176177NULL NULL 2
177178
178179# array_length scalar function #4
179- query IIII rowsort
180+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
181+ caused by
182+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
180183select array_length(array_fill(3, [3, 2, 5]), 1), array_length(array_fill(3, [3, 2, 5]), 2), array_length(array_fill(3, [3, 2, 5]), 3), array_length(array_fill(3, [3, 2, 5]), 4);
181- ----
182- 3 2 5 NULL
183184
184185# array_dims scalar function
185- query III rowsort
186+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
187+ caused by
188+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: UInt8, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to UInt8
186189select array_dims(make_array(1, 2, 3)), array_dims(make_array([1, 2], [3, 4])), array_dims(make_array([[[[1], [2]]]]));
187- ----
188- [3] [2, 2] [1, 1, 1, 2, 1]
189190
190191# array_dims scalar function #2
191- query II rowsort
192+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
193+ caused by
194+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
192195select array_dims(array_fill(2, [1, 2, 3])), array_dims(array_fill(3, [2, 5, 4]));
193- ----
194- [1, 2, 3] [2, 5, 4]
195196
196197# array_ndims scalar function
197198query III rowsort
@@ -200,7 +201,7 @@ select array_ndims(make_array(1, 2, 3)), array_ndims(make_array([1, 2], [3, 4]))
2002011 2 5
201202
202203# array_ndims scalar function #2
203- query II rowsort
204+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
205+ caused by
206+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
204207select array_ndims(array_fill(1, [1, 2, 3])), array_ndims([[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]);
205- ----
206- 3 21
0 commit comments