Class DateTypeFunctions.IsDate
java.lang.Object
org.apache.drill.exec.expr.fn.impl.DateTypeFunctions.IsDate
- All Implemented Interfaces:
DrillFunc
,DrillSimpleFunc
- Enclosing class:
- DateTypeFunctions
Function to check if a varchar value can be cast to a date.
At the time of writing this function, several other databases were checked
for behavior compatibility. There was not a consensus between oracle and Sql
server about the expected behavior of this function, and Postgres lacks it
completely.
Sql Server appears to have both a DATEFORMAT and language locale setting that
can change the values accepted by this function. Oracle appears to support
several formats, some of which are not mentioned in the Sql Server docs. With
the lack of standardization, we decided to implement this function so that it
would only consider date strings that would be accepted by the cast function
as valid.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
IsDate
public IsDate()
-
-
Method Details
-
setup
public void setup()- Specified by:
setup
in interfaceDrillSimpleFunc
-
eval
public void eval()- Specified by:
eval
in interfaceDrillSimpleFunc
-