public abstract class BeamSqlMathBinaryExpression extends BeamSqlExpression
operands, outputType| Constructor and Description |
|---|
BeamSqlMathBinaryExpression(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.
|
abstract BeamSqlPrimitive<? extends java.lang.Number> |
calculate(BeamSqlPrimitive leftOp,
BeamSqlPrimitive rightOp)
The base method for implementation of math binary functions.
|
BeamSqlPrimitive<? extends java.lang.Number> |
evaluate(Row inputRow,
BoundedWindow window,
BeamSqlExpressionEnvironment env)
Apply input record
Row with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive. |
boolean |
isOperandNumeric(org.apache.calcite.sql.type.SqlTypeName opType)
The method to check whether operands are numeric or not.
|
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluatedpublic BeamSqlMathBinaryExpression(java.util.List<BeamSqlExpression> operands, org.apache.calcite.sql.type.SqlTypeName outputType)
public boolean accept()
BeamSqlExpressionaccept in class BeamSqlExpressionpublic BeamSqlPrimitive<? extends java.lang.Number> evaluate(Row inputRow, BoundedWindow window, BeamSqlExpressionEnvironment env)
BeamSqlExpressionRow with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive.evaluate in class BeamSqlExpressionpublic abstract BeamSqlPrimitive<? extends java.lang.Number> calculate(BeamSqlPrimitive leftOp, BeamSqlPrimitive rightOp)
leftOp - BeamSqlPrimitiverightOp - BeamSqlPrimitiveBeamSqlPrimitivepublic boolean isOperandNumeric(org.apache.calcite.sql.type.SqlTypeName opType)