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,
org.apache.calcite.sql.type.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(Row inputRow,
BoundedWindow window,
BeamSqlExpressionEnvironment env)
Apply input record
Row with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive. |
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluatedpublic BeamSqlDatetimeMinusExpression(java.util.List<BeamSqlExpression> operands, org.apache.calcite.sql.type.SqlTypeName outputType)
public boolean accept()
BeamSqlExpressionaccept in class BeamSqlExpressionpublic BeamSqlPrimitive evaluate(Row inputRow, BoundedWindow window, BeamSqlExpressionEnvironment env)
BeamSqlExpressionRow with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive.evaluate in class BeamSqlExpression