public abstract class DateRangeRules extends java.lang.Object
EXTRACT(timeUnit FROM dateTime) = constant,
FLOOR(dateTime to timeUnit= constant} and
CEIL(dateTime to timeUnit= constant} to
dateTime BETWEEN lower AND upper.
The rules allow conversion of queries on time dimension tables, such as
SELECT ... FROM sales JOIN time_by_day USING (time_id) WHERE time_by_day.the_year = 1997 AND time_by_day.the_month IN (4, 5, 6)
SELECT ... FROM sales JOIN time_by_day USING (time_id) WHERE the_date BETWEEN DATE '2016-04-01' AND DATE '2016-06-30'
and is especially useful for Druid, which has a single timestamp column.
|Modifier and Type||Class and Description|
Rule that converts EXTRACT, FLOOR and CEIL in a
|Modifier and Type||Method and Description|
Replaces calls to EXTRACT, FLOOR and CEIL in an expression.
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.