public abstract class BeamSqlCompareExpression extends BeamSqlExpression
BeamSqlCompareExpression is used for compare operations.
See BeamSqlEqualsExpression, BeamSqlLessThanExpression, BeamSqlLessThanOrEqualsExpression, BeamSqlGreaterThanExpression, BeamSqlGreaterThanOrEqualsExpression and BeamSqlNotEqualsExpression for more details.
operands, outputType| Constructor and Description |
|---|
BeamSqlCompareExpression(java.util.List<BeamSqlExpression> operands) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept()
Compare operation must have 2 operands.
|
abstract java.lang.Boolean |
compare(java.lang.Boolean leftValue,
java.lang.Boolean rightValue)
Compare between Boolean values, mapping to
SqlTypeName.BOOLEAN. |
abstract java.lang.Boolean |
compare(java.lang.CharSequence leftValue,
java.lang.CharSequence rightValue)
Compare between String values, mapping to
SqlTypeName.VARCHAR. |
abstract java.lang.Boolean |
compare(DateTime leftValue,
DateTime rightValue)
Compare between DateTime values, mapping to
SqlTypeName.DATETIME_TYPES. |
abstract java.lang.Boolean |
compare(java.lang.Number leftValue,
java.lang.Number rightValue)
Compare between Number values, including
SqlTypeName.BIGINT, SqlTypeName.DECIMAL, SqlTypeName.DOUBLE, SqlTypeName.FLOAT, SqlTypeName.INTEGER, SqlTypeName.SMALLINT and SqlTypeName.TINYINT. |
BeamSqlPrimitive<java.lang.Boolean> |
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 BeamSqlCompareExpression(java.util.List<BeamSqlExpression> operands)
public boolean accept()
accept in class BeamSqlExpressionpublic BeamSqlPrimitive<java.lang.Boolean> 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 java.lang.Boolean compare(java.lang.CharSequence leftValue,
java.lang.CharSequence rightValue)
SqlTypeName.VARCHAR.public abstract java.lang.Boolean compare(java.lang.Boolean leftValue,
java.lang.Boolean rightValue)
SqlTypeName.BOOLEAN.public abstract java.lang.Boolean compare(java.lang.Number leftValue,
java.lang.Number rightValue)
SqlTypeName.BIGINT, SqlTypeName.DECIMAL, SqlTypeName.DOUBLE, SqlTypeName.FLOAT, SqlTypeName.INTEGER, SqlTypeName.SMALLINT and SqlTypeName.TINYINT.