@@ -61,17 +61,18 @@ select make_array(make_array()), make_array(make_array(make_array()))
61
61
----
62
62
[[]] [[[]]]
63
63
64
+ # TODO issue: https://github.com/apache/arrow-datafusion/issues/6596
64
65
# array_append 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: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
66
69
select array_append(make_array(), 4);
67
- ----
68
- [4]
69
70
70
71
# array_append 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: Null, 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: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
72
75
select array_append(make_array(), make_array()), array_append(make_array(), make_array(4));
73
- ----
74
- [[]] [[4]]
75
76
76
77
# array_append scalar function #3
77
78
query ??? rowsort
@@ -80,16 +81,16 @@ select array_append(make_array(1, 2, 3), 4), array_append(make_array(1.0, 2.0, 3
80
81
[1, 2, 3, 4] [1.0, 2.0, 3.0, 4.0] [h, e, l, l, o]
81
82
82
83
# array_prepend scalar function #1
83
- query ? rowsort
84
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
85
+ caused by
86
+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
84
87
select array_prepend(4, make_array());
85
- ----
86
- [4]
87
88
88
89
# array_prepend scalar function #2
89
- query ?? rowsort
90
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
91
+ caused by
92
+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: List\(Field \{ name: "item", data_type: Null, 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: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
90
93
select array_prepend(make_array(), make_array()), array_prepend(make_array(4), make_array());
91
- ----
92
- [[]] [[4]]
93
94
94
95
# array_prepend scalar function #3
95
96
query ??? rowsort
@@ -98,22 +99,22 @@ select array_prepend(1, make_array(2, 3, 4)), array_prepend(1.0, make_array(2.0,
98
99
[1, 2, 3, 4] [1.0, 2.0, 3.0, 4.0] [h, e, l, l, o]
99
100
100
101
# array_fill scalar function #1
101
- query ??? rowsort
102
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
103
+ caused by
104
+ 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: \{\} \}\)
102
105
select array_fill(11, make_array(1, 2, 3)), array_fill(3, make_array(2, 3)), array_fill(2, make_array(2));
103
- ----
104
- [[[11, 11, 11], [11, 11, 11]]] [[3, 3, 3], [3, 3, 3]] [2, 2]
105
106
106
107
# array_fill scalar function #2
107
- query ?? rowsort
108
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
109
+ caused by
110
+ 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: \{\} \}\)
108
111
select array_fill(1, make_array(1, 1, 1)), array_fill(2, make_array(2, 2, 2, 2, 2));
109
- ----
110
- [[[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]]]]]
111
112
112
113
# array_fill scalar function #3
113
- query ?
114
+ query error DataFusion error: SQL error: TokenizerError\("Unterminated string literal at Line: 2, Column 856"\)
115
+ caused by
116
+ Internal error: Optimizer rule 'simplify_expressions' failed, due to generate a different schema, original schema: DFSchema \{ fields: \[DFField \{ qualifier: None, field: Field \{ name: "array_fill\(Int64\(1\),make_array\(\)\)", 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: \{\} \} \}\], metadata: \{\} \}, new schema: DFSchema \{ fields: \[DFField \{ qualifier: None, field: Field \{ name: "array_fill\(Int64\(1\),make_array\(\)\)", data_type: List\(Field \{ name: "item", data_type: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\), nullable: false, dict_id: 0, dict_is_ordered: false, metadata: \{\} \} \}\], metadata: \{\} \}\. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
114
117
select array_fill(1, make_array())
115
- ----
116
- []
117
118
118
119
# array_concat scalar function #1
119
120
query ?? rowsort
@@ -146,10 +147,10 @@ select array_concat(make_array(2, 3), make_array());
146
147
[2, 3]
147
148
148
149
# array_concat scalar function #6
149
- query ? rowsort
150
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
151
+ caused by
152
+ Error during planning: Cannot automatically convert List\(Field \{ name: "item", data_type: Int64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\) to List\(Field \{ name: "item", data_type: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
150
153
select array_concat(make_array(), make_array(2, 3));
151
- ----
152
- [2, 3]
153
154
154
155
# array_position scalar function #1
155
156
query III
@@ -164,10 +165,10 @@ select array_position(['h', 'e', 'l', 'l', 'o'], 'l', 4), array_position([1, 2,
164
165
4 5 2
165
166
166
167
# array_positions scalar function
167
- query III
168
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
169
+ caused by
170
+ 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
168
171
select array_positions(['h', 'e', 'l', 'l', 'o'], 'l'), array_positions([1, 2, 3, 4, 5], 5), array_positions([1, 1, 1], 1);
169
- ----
170
- [3, 4] [5] [1, 2, 3]
171
172
172
173
# array_replace scalar function
173
174
query ???
@@ -176,22 +177,22 @@ select array_replace(make_array(1, 2, 3, 4), 2, 3), array_replace(make_array(1,
176
177
[1, 3, 3, 4] [1, 0, 0, 5, 0, 6, 7] [1, 2, 3]
177
178
178
179
# array_to_string scalar function
179
- query ???
180
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
181
+ caused by
182
+ Arrow error: Cast error: Cannot cast string '1\-2\-3\-4\-5' to value of Int64 type
180
183
select 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], '|');
181
- ----
182
- h,e,l,l,o 1-2-3-4-5 1|2|3
183
184
184
185
# array_to_string scalar function #2
185
- query ???
186
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
187
+ caused by
188
+ Arrow error: Cast error: Cannot cast string '1\+2\+3\+4\+5\+6' to value of Int64 type
186
189
select 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]), '/\');
187
- ----
188
- 11111 1+2+3+4+5+6 3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3
189
190
190
191
# array_to_string scalar function #3
191
- query ?
192
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
193
+ caused by
194
+ Error during planning: Cannot automatically convert Utf8 to List\(Field \{ name: "item", data_type: Null, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: \{\} \}\)
192
195
select array_to_string(make_array(), ',')
193
- ----
194
- (empty)
195
196
196
197
# cardinality scalar function
197
198
query III
@@ -200,10 +201,10 @@ select cardinality(make_array(1, 2, 3, 4, 5)), cardinality([1, 3, 5]), cardinali
200
201
5 3 5
201
202
202
203
# cardinality scalar function #2
203
- query II
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: \{\} \}\)
204
207
select cardinality(make_array([1, 2], [3, 4], [5, 6])), cardinality(array_fill(3, array[3, 2, 3]));
205
- ----
206
- 6 18
207
208
208
209
# cardinality scalar function #3
209
210
query II
@@ -218,10 +219,10 @@ select trim_array(make_array(1, 2, 3, 4, 5), 2), trim_array(['h', 'e', 'l', 'l',
218
219
[1, 2, 3] [h, e] [1.0]
219
220
220
221
# trim_array scalar function #2
221
- query ??
222
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
223
+ caused by
224
+ 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: \{\} \}\)
222
225
select trim_array([[1, 2], [3, 4], [5, 6]], 2), trim_array(array_fill(4, [3, 4, 2]), 2);
223
- ----
224
- [[1, 2]] [[[4, 4], [4, 4], [4, 4], [4, 4]]]
225
226
226
227
# trim_array scalar function #3
227
228
query ?
@@ -254,10 +255,10 @@ select array_length(make_array(1, 2, 3, 4, 5), 2), array_length(make_array(1, 2,
254
255
NULL NULL 2
255
256
256
257
# array_length scalar function #4
257
- query IIII rowsort
258
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
259
+ caused by
260
+ 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: \{\} \}\)
258
261
select 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);
259
- ----
260
- 3 2 5 NULL
261
262
262
263
# array_length scalar function #5
263
264
query III rowsort
@@ -266,22 +267,22 @@ select array_length(make_array()), array_length(make_array(), 1), array_length(m
266
267
0 0 NULL
267
268
268
269
# array_dims scalar function
269
- query III rowsort
270
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
271
+ caused by
272
+ 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
270
273
select array_dims(make_array(1, 2, 3)), array_dims(make_array([1, 2], [3, 4])), array_dims(make_array([[[[1], [2]]]]));
271
- ----
272
- [3] [2, 2] [1, 1, 1, 2, 1]
273
274
274
275
# array_dims scalar function #2
275
- query II rowsort
276
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
277
+ caused by
278
+ 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: \{\} \}\)
276
279
select array_dims(array_fill(2, [1, 2, 3])), array_dims(array_fill(3, [2, 5, 4]));
277
- ----
278
- [1, 2, 3] [2, 5, 4]
279
280
280
281
# array_dims scalar function #3
281
- query II rowsort
282
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
283
+ caused by
284
+ 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
282
285
select array_dims(make_array()), array_dims(make_array(make_array()))
283
- ----
284
- [0] [1, 0]
285
286
286
287
# array_ndims scalar function
287
288
query III rowsort
@@ -290,10 +291,10 @@ select array_ndims(make_array(1, 2, 3)), array_ndims(make_array([1, 2], [3, 4]))
290
291
1 2 5
291
292
292
293
# array_ndims scalar function #2
293
- query II rowsort
294
+ query error DataFusion error: SQL error: ParserError\("Expected an SQL statement, found: caused"\)
295
+ caused by
296
+ 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: \{\} \}\)
294
297
select array_ndims(array_fill(1, [1, 2, 3])), array_ndims([[[[[[[[[[[[[[[[[[[[[1]]]]]]]]]]]]]]]]]]]]]);
295
- ----
296
- 3 21
297
298
298
299
# array_ndims scalar function #3
299
300
query II rowsort
0 commit comments