public class BeamSqlTimestampMinusTimestampExpression extends BeamSqlExpression
Currently this implementation is specific to how Calcite parses 'TIMESTAMPDIFF(..)'. It converts the TIMESTAMPDIFF() call into infix minus and normalizes it with corresponding TimeUnit's multiplier.
See BeamSqlDatetimeMinusExpression for other kinds of datetime types subtraction.
operands, outputType| Constructor and Description |
|---|
BeamSqlTimestampMinusTimestampExpression(java.util.List<BeamSqlExpression> operands,
SqlTypeName intervalType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept()
Requires exactly 2 operands.
|
BeamSqlPrimitive |
evaluate(Row inputRow,
BoundedWindow window)
Returns the count of intervals between dates, times TimeUnit.multiplier of the interval type.
|
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluatedpublic BeamSqlTimestampMinusTimestampExpression(java.util.List<BeamSqlExpression> operands, SqlTypeName intervalType)
public boolean accept()
accept in class BeamSqlExpressionpublic BeamSqlPrimitive evaluate(Row inputRow, BoundedWindow window)
evaluate in class BeamSqlExpression