@PublicEvolving public class TruncateDateToHour extends ScalarFunction
Constructor and Description |
---|
TruncateDateToHour() |
Modifier and Type | Method and Description |
---|---|
long |
eval(long timestamp) |
TypeInformation<?> |
getResultType(Class<?>[] signature)
Returns the result type of the evaluation method with a given signature.
|
getKind, getParameterTypes
close, functionIdentifier, open, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRequirements, isDeterministic
public long eval(long timestamp)
public TypeInformation<?> getResultType(Class<?>[] signature)
ScalarFunction
This method needs to be overridden in case Flink's type extraction facilities are not
sufficient to extract the TypeInformation
based on the return type of the evaluation
method. Flink's type extraction facilities can handle basic types or
simple POJOs but might be wrong for more complex, custom, or composite types.
getResultType
in class ScalarFunction
signature
- signature of the method the return type needs to be determinedTypeInformation
of result type or null
if Flink should
determine the typeCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.