Spark SQL supports interval type defined by the ANSI SQL standard using
DayTimeIntervalTypefor day-time intervals
YearMonthIntervalTypefor year-month intervals
Intervals can be positive and negative.
ANSI intervals are supported by parquet data source as follows:
DayTimeIntervalTypeis the same as
YearMonthIntervalTypeis the same as
select date'today' - date'2021-01-01' as diff