Skip to content

Commit 7c72911

Browse files
Fix CI test failures
1 parent a871070 commit 7c72911

1 file changed

Lines changed: 20 additions & 120 deletions

File tree

datafusion/sqllogictest/test_files/spark/array/sequence.slt

Lines changed: 20 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ SELECT sequence(5, 1, -1);
6969
----
7070
[5, 4, 3, 2, 1]
7171

72+
query ?
73+
SELECT sequence(2, 2);
74+
----
75+
[2]
76+
77+
query ?
78+
SELECT sequence(-2, -2);
79+
----
80+
[-2]
81+
7282
query ?
7383
SELECT sequence(TIMESTAMP '2023-01-03T00:00:00', TIMESTAMP '2023-01-01T00:00:00', INTERVAL '-1' DAY)
7484
----
@@ -182,142 +192,32 @@ SELECT sequence(TIMESTAMP '2023-01-01T00:00:00', NULL::TIMESTAMP, INTERVAL '1' D
182192
----
183193
NULL
184194

185-
query error
186-
SELECT sequence(TIMESTAMP '2023-01-03T00:00:00', TIMESTAMP '2023-01-01T00:00:00', NULL)
187-
----
188-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: third parameter type must be one of integer or interval type but found: Null. No function matches the given name and argument types 'sequence(Timestamp(ns), Timestamp(ns), Null)'. You might need to add explicit type casts.
189-
Candidate functions:
190-
sequence(UserDefined)
191-
192-
193-
# QUERY ERROR TESTS
194-
query error
195-
SELECT sequence(5, DATE '2018-03-01');
196-
----
197-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Int64) and second(Date32) input types should be same. No function matches the given name and argument types 'sequence(Int64, Date32)'. You might need to add explicit type casts.
198-
Candidate functions:
199-
sequence(UserDefined)
200-
201-
202-
query error
203-
SELECT sequence(1, DATE '2018-03-01', INTERVAL 1 MONTH);
204-
----
205-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Int64) and second(Date32) input types should be same. No function matches the given name and argument types 'sequence(Int64, Date32, Interval(MonthDayNano))'. You might need to add explicit type casts.
206-
Candidate functions:
207-
sequence(UserDefined)
208-
209-
210-
query error
211-
SELECT sequence(1, TIMESTAMP '2023-01-01T00:00:00');
212-
----
213-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Int64) and second(Timestamp(ns)) input types should be same. No function matches the given name and argument types 'sequence(Int64, Timestamp(ns))'. You might need to add explicit type casts.
214-
Candidate functions:
215-
sequence(UserDefined)
216-
217-
218-
query error
219-
SELECT sequence(1, TIMESTAMP '2023-01-01T00:00:00', INTERVAL 1 MONTH);
220-
----
221-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Int64) and second(Timestamp(ns)) input types should be same. No function matches the given name and argument types 'sequence(Int64, Timestamp(ns), Interval(MonthDayNano))'. You might need to add explicit type casts.
222-
Candidate functions:
223-
sequence(UserDefined)
224-
225-
226-
query error
227-
SELECT sequence(DATE '2023-01-01', TIMESTAMP '2023-03-01T00:00:00');
228-
----
229-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Date32) and second(Timestamp(ns)) input types should be same. No function matches the given name and argument types 'sequence(Date32, Timestamp(ns))'. You might need to add explicit type casts.
230-
Candidate functions:
231-
sequence(UserDefined)
232-
233-
234-
query error
235-
SELECT sequence(DATE '2023-01-01', TIMESTAMP '2023-03-01T00:00:00', INTERVAL 1 MONTH);
236-
----
237-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first(Date32) and second(Timestamp(ns)) input types should be same. No function matches the given name and argument types 'sequence(Date32, Timestamp(ns), Interval(MonthDayNano))'. You might need to add explicit type casts.
238-
Candidate functions:
239-
sequence(UserDefined)
240-
241-
242-
query error
195+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based
243196
SELECT sequence(1, 6, INTERVAL 1 MONTH);
244-
----
245-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based. No function matches the given name and argument types 'sequence(Int64, Int64, Interval(MonthDayNano))'. You might need to add explicit type casts.
246-
Candidate functions:
247-
sequence(UserDefined)
248197

249-
250-
query error
198+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based
251199
SELECT sequence(DATE '2023-01-01', DATE '2023-03-01', 1);
252-
----
253-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based. No function matches the given name and argument types 'sequence(Date32, Date32, Int64)'. You might need to add explicit type casts.
254-
Candidate functions:
255-
sequence(UserDefined)
256200

257-
258-
query error
201+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based
259202
SELECT sequence(TIMESTAMP '2023-01-01T00:00:00', TIMESTAMP '2023-03-01T00:00:00', 1);
260-
----
261-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: interval type should be integer for integer input or time based. No function matches the given name and argument types 'sequence(Timestamp(ns), Timestamp(ns), Int64)'. You might need to add explicit type casts.
262-
Candidate functions:
263-
sequence(UserDefined)
264-
265203

266-
query error
204+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: second parameter type must be one of integer, date or timestamp type but found: Utf8
267205
SELECT sequence(1, 'abc');
268-
----
269-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: second parameter type must be one of integer, date or timestamp type but found: Utf8. No function matches the given name and argument types 'sequence(Int64, Utf8)'. You might need to add explicit type casts.
270-
Candidate functions:
271-
sequence(UserDefined)
272-
273206

274-
query error
207+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first parameter type must be one of integer, date or timestamp type but found: Utf8
275208
SELECT sequence('abc', 2);
276-
----
277-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: first parameter type must be one of integer, date or timestamp type but found: Utf8. No function matches the given name and argument types 'sequence(Utf8, Int64)'. You might need to add explicit type casts.
278-
Candidate functions:
279-
sequence(UserDefined)
280-
281209

282-
query error
210+
query error DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: num of input parameters should be 2 or 3
283211
SELECT sequence(1);
284-
----
285-
DataFusion error: Error during planning: Execution error: Function 'sequence' user-defined coercion failed with: Execution error: num of input parameters should be 2 or 3. No function matches the given name and argument types 'sequence(Int64)'. You might need to add explicit type casts.
286-
Candidate functions:
287-
sequence(UserDefined)
288212

289-
290-
query ?
291-
SELECT sequence(2, 2);
292-
----
293-
[2]
294-
295-
query ?
296-
SELECT sequence(-2, -2);
297-
----
298-
[-2]
299-
300-
query error
213+
query error DataFusion error: Execution error: When start > stop, step must be negative
301214
SELECT sequence(5, 0, 1);
302-
----
303-
DataFusion error: Execution error: When start > stop, step must be negative
304215

305-
306-
query error
216+
query error DataFusion error: Execution error: When start < stop, step must be positive
307217
SELECT sequence(0, 5, -1);
308-
----
309-
DataFusion error: Execution error: When start < stop, step must be positive
310-
311218

312-
query error
219+
query error DataFusion error: Execution error: Step cannot be 0 for sequence
313220
SELECT sequence(1, 5, 0);
314-
----
315-
DataFusion error: Execution error: Step cannot be 0 for sequence
316-
317221

318-
query error
222+
query error DataFusion error: Execution error: Step cannot be 0 for sequence
319223
SELECT sequence(5, 1, 0);
320-
----
321-
DataFusion error: Execution error: Step cannot be 0 for sequence
322-
323-

0 commit comments

Comments
 (0)