Skip to content

Commit

Permalink
test udf+udtf generate_series() in the same sql
Browse files Browse the repository at this point in the history
  • Loading branch information
2010YOUY01 committed Nov 30, 2024
1 parent 07126eb commit e5834b7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion datafusion/sqllogictest/test_files/table_functions.slt
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,12 @@ statement error DataFusion error: Error during planning: Second argument must be
SELECT * FROM generate_series(1, '2')

statement error DataFusion error: Error during planning: First argument must be an integer literal
SELECT * FROM generate_series('foo', 'bar')
SELECT * FROM generate_series('foo', 'bar')

# UDF and UDTF `generate_series` can be used simultaneously
query ? rowsort
SELECT generate_series(1, t1.end) FROM generate_series(3, 5) as t1(end)
----
[1, 2, 3, 4, 5]
[1, 2, 3, 4]
[1, 2, 3]

0 comments on commit e5834b7

Please sign in to comment.