Package org.apache.drill.exec.udfs
Class DateFunctions.NearestDateFunction
java.lang.Object
org.apache.drill.exec.udfs.DateFunctions.NearestDateFunction
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- DateFunctions
This function takes two arguments, an input date object, and an interval and returns
the previous date that is the first date in that period. This function is intended to be used in time series analysis to
aggregate by various units of time.
Usage is:
SELECT
Currently supports the following time units:
YEAR
QUARTER
MONTH
WEEK_SUNDAY
WEEK_MONDAY
DAY
HOUR
HALF_HOUR
QUARTER_HOUR
MINUTE
30SECOND
15SECOND
SECOND
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
NearestDateFunction
public NearestDateFunction()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-