Class GAge.AgeDateToMidnight
java.lang.Object
org.apache.drill.exec.expr.fn.impl.GAge.AgeDateToMidnight
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- GAge
Unary form, subtracts `right` from midnight so equivalent to
`select age(current_date, right)`.
Note that this function does not count calendar boundary crossings,
e.g. between yesterday 23:00 and today 01:00 is two hours, not one day.
Modeled on the AGE function in PostgreSQL, see
https://www.postgresql.org/docs/current/functions-datetime.html.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
AgeDateToMidnight
public AgeDateToMidnight()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-