public abstract class BeamSqlArithmeticExpression extends BeamSqlExpression
operands, outputType
Modifier | Constructor and Description |
---|---|
protected |
BeamSqlArithmeticExpression(java.util.List<BeamSqlExpression> operands) |
protected |
BeamSqlArithmeticExpression(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.
|
protected abstract java.math.BigDecimal |
calc(java.math.BigDecimal left,
java.math.BigDecimal right) |
protected static org.apache.calcite.sql.type.SqlTypeName |
deduceOutputType(org.apache.calcite.sql.type.SqlTypeName left,
org.apache.calcite.sql.type.SqlTypeName right) |
BeamSqlPrimitive<? extends java.lang.Number> |
evaluate(Row inputRow,
BoundedWindow window,
ImmutableMap<java.lang.Integer,java.lang.Object> correlateEnv)
Apply input record
Row with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive . |
protected BeamSqlPrimitive<? extends java.lang.Number> |
getCorrectlyTypedResult(java.math.BigDecimal rawResult) |
getOperands, getOutputType, numberOfOperands, op, opType, opValueEvaluated
protected BeamSqlArithmeticExpression(java.util.List<BeamSqlExpression> operands)
protected BeamSqlArithmeticExpression(java.util.List<BeamSqlExpression> operands, org.apache.calcite.sql.type.SqlTypeName outputType)
public BeamSqlPrimitive<? extends java.lang.Number> evaluate(Row inputRow, BoundedWindow window, ImmutableMap<java.lang.Integer,java.lang.Object> correlateEnv)
BeamSqlExpression
Row
with BoundedWindow
to this expression, the output value
is wrapped with BeamSqlPrimitive
.evaluate
in class BeamSqlExpression
protected abstract java.math.BigDecimal calc(java.math.BigDecimal left, java.math.BigDecimal right)
protected static org.apache.calcite.sql.type.SqlTypeName deduceOutputType(org.apache.calcite.sql.type.SqlTypeName left, org.apache.calcite.sql.type.SqlTypeName right)
public boolean accept()
BeamSqlExpression
accept
in class BeamSqlExpression
protected BeamSqlPrimitive<? extends java.lang.Number> getCorrectlyTypedResult(java.math.BigDecimal rawResult)