Vertica 10.1 docs saying about date_trunc:
The return value is the same data type as the input value.
At same time, return from date_trunc with date argument is timestamp:
select date_trunc('year','2020-01-01'::date);
2020-01-01 00:00:00.000000
Attempt to create table partitioned by date_trunc('year', date_column) gives warning:
17:05:18 WARNING [CREATE - 0 rows, 0.345 secs] OK. No rows were affected
SQLWarning:
Code: 6100 SQL State: 42611 --- Using PARTITION expression that returns a Timestamp value
Hint: This PARTITION expression may cause too many data partitions. Use of an expression that returns a more accurate value, such as a regular VARCHAR or INT, is encouraged
This is for partitioning clause "partition by date_trunc('year',msg_dt)"
I would totally expect output of date_trunc be of same type as input argument.
What is wrong, is it a wrong docs, or bug in function date_trunc?
