You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/spark/array/sequence.slt
+36-5Lines changed: 36 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,6 @@ SELECT sequence(0, 5, 1);
39
39
----
40
40
[0, 1, 2, 3, 4, 5]
41
41
42
-
query ?
43
-
SELECT sequence(5, 0, 1);
44
-
----
45
-
[5, 4, 3, 2, 1, 0]
46
-
47
42
query ?
48
43
SELECT sequence(-3::int, 3::int);
49
44
----
@@ -290,3 +285,39 @@ SELECT sequence(1);
290
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.
291
286
Candidate functions:
292
287
sequence(UserDefined)
288
+
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
301
+
SELECT sequence(5, 0, 1);
302
+
----
303
+
DataFusion error: Execution error: When start > stop, step must be negative
304
+
305
+
306
+
query error
307
+
SELECT sequence(0, 5, -1);
308
+
----
309
+
DataFusion error: Execution error: When start < stop, step must be positive
310
+
311
+
312
+
query error
313
+
SELECT sequence(1, 5, 0);
314
+
----
315
+
DataFusion error: Execution error: Step cannot be 0 for sequence
316
+
317
+
318
+
query error
319
+
SELECT sequence(5, 1, 0);
320
+
----
321
+
DataFusion error: Execution error: Step cannot be 0 for sequence
0 commit comments