Skip to content

Commit 91efce9

Browse files
committed
SLT: verify generate_series returning Date
1 parent af0662a commit 91efce9

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎datafusion/sqllogictest/test_files/information_schema.slt‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,18 @@ select count(*) from information_schema.parameters where specific_name = 'date_p
972972
----
973973
0
974974

975+
# Verify coerced return type of `generate_series`: it should be Date32
976+
query TI?T rowsort
977+
select specific_name, rid,
978+
array_agg(data_type order by ordinal_position) filter (where parameter_mode = 'IN') as args,
979+
max(data_type) filter (where parameter_mode = 'OUT') as return
980+
from information_schema.parameters where specific_name = 'generate_series'
981+
group by specific_name, rid
982+
having args[1] = 'String' and args[2] like 'Date' and args[3] like 'Interval%';
983+
----
984+
generate_series 7 [String, Date, Interval(DayTime)] List(Date)
985+
generate_series 8 [String, Date, Interval(MonthDayNano)] List(Date)
986+
975987
# Table functions (UDTFs) appear in information_schema.routines with
976988
# function_type = TABLE and data_type = TABLE.
977989
# Note: built-in `generate_series` and `range` are registered as BOTH a

0 commit comments

Comments
 (0)