Package org.apache.drill.exec.udfs
Class DateFunctions.NearestDateFunctionWithString
java.lang.Object
org.apache.drill.exec.udfs.DateFunctions.NearestDateFunctionWithString
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- DateFunctions
public static class DateFunctions.NearestDateFunctionWithString
extends Object
implements DrillSimpleFunc
This function takes three arguments, an input date string, an input date format string, 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
-
NearestDateFunctionWithString
public NearestDateFunctionWithString()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-