Description
Support comparison of
- a day-time interval with another day-time interval which has different fields
- a year-month interval with another year-month interval where fields are different.
The example below shows the issue:
spark-sql> select interval '1' day > interval '1' hour; Error in query: cannot resolve '(INTERVAL '1' DAY > INTERVAL '01' HOUR)' due to data type mismatch: differing types in '(INTERVAL '1' DAY > INTERVAL '01' HOUR)' (interval day and interval hour).; line 1 pos 7; 'Project [unresolvedalias((INTERVAL '1' DAY > INTERVAL '01' HOUR), None)] +- OneRowRelation spark-sql> select interval '2' year > interval '11' month; Error in query: cannot resolve '(INTERVAL '2' YEAR > INTERVAL '11' MONTH)' due to data type mismatch: differing types in '(INTERVAL '2' YEAR > INTERVAL '11' MONTH)' (interval year and interval month).; line 1 pos 7; 'Project [unresolvedalias((INTERVAL '2' YEAR > INTERVAL '11' MONTH), None)] +- OneRowRelation