I am using this clause to filter a query against a table with partition columns (year,month,day,hour):
select * from someTable where
cast(concat(cast(year as string), '-',
lpad(cast(month as string), 2, "0"), "-",
lpad(cast(day as string), 2, "0"), " ",
lpad(cast(hour as string), 2, "0"), ":00:00"
) as timestamp) > date_sub(cast('2016-07-15T04:45:15Z' as timestamp), interval 5000001 hour)
And I get back a non-empty result set.
However, if I bump up the interval to 6000001, I get back an empty result set.
This should produce a warning but it does not because the predicate is constant and is evaluated by the FE which cannot propagate the expr warnings.
Executing the following query does result in the expected warning because the BE executes the fn: