public class BeamSqlDatetimeMinusExpression extends BeamSqlExpression
Implements 2 SQL subtraction operations at the moment: 'timestampdiff(timeunit, timestamp, timestamp)', and 'timestamp - interval'
Calcite converts both of the above into infix '-' expression, with different operands and return types.
This class delegates evaluation to specific implementation of one of the above operations,
see BeamSqlTimestampMinusTimestampExpression
and BeamSqlTimestampMinusIntervalExpression
Calcite supports one more subtraction kind: 'interval - interval', but it is not implemented yet.
operands, outputType| Constructor and Description |
|---|
BeamSqlDatetimeMinusExpression(java.util.List<BeamSqlExpression> operands,
SqlTypeName outputType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept()
assertion to make sure the input and output are supported in this expression.
|
BeamSqlPrimitive |
evaluate(BeamRecord inputRow,
BoundedWindow window)
Apply input record
BeamRecord with BoundedWindow to this expression,
the output value is wrapped with BeamSqlPrimitive. |
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluatedpublic BeamSqlDatetimeMinusExpression(java.util.List<BeamSqlExpression> operands, SqlTypeName outputType)
public boolean accept()
BeamSqlExpressionaccept in class BeamSqlExpressionpublic BeamSqlPrimitive evaluate(BeamRecord inputRow, BoundedWindow window)
BeamSqlExpressionBeamRecord with BoundedWindow to this expression,
the output value is wrapped with BeamSqlPrimitive.evaluate in class BeamSqlExpression