public class BeamSqlDatetimePlusExpression extends BeamSqlExpression
Input and output are expected to be of type TIMESTAMP.
operands, outputType
Constructor and Description |
---|
BeamSqlDatetimePlusExpression(java.util.List<BeamSqlExpression> operands) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept()
Requires exactly 2 operands.
|
BeamSqlPrimitive |
evaluate(Row inputRow,
BoundedWindow window,
BeamSqlExpressionEnvironment env)
Adds interval to the timestamp.
|
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluated
public BeamSqlDatetimePlusExpression(java.util.List<BeamSqlExpression> operands)
public boolean accept()
accept
in class BeamSqlExpression
public BeamSqlPrimitive evaluate(Row inputRow, BoundedWindow window, BeamSqlExpressionEnvironment env)
Interval has a value of 'multiplier * TimeUnit.multiplier'.
For example, '3 years' is going to have a type of INTERVAL_YEAR, and a value of 36. And '2
minutes' is going to be an INTERVAL_MINUTE with a value of 120000. This is the way Calcite
handles interval expressions, and BeamSqlIntervalMultiplyExpression
also works the same
way.
evaluate
in class BeamSqlExpression