public abstract class BeamSqlExpression
extends java.lang.Object
implements java.io.Serializable
BeamSqlExpression
is an equivalent expression in BeamSQL, of RexNode
in Calcite.
An implementation of BeamSqlExpression
takes one or more BeamSqlExpression
as its operands, and return a value with type SqlTypeName
.
Modifier and Type | Field and Description |
---|---|
protected java.util.List<BeamSqlExpression> |
operands |
protected SqlTypeName |
outputType |
Modifier | Constructor and Description |
---|---|
protected |
BeamSqlExpression() |
|
BeamSqlExpression(java.util.List<BeamSqlExpression> operands,
SqlTypeName outputType) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
accept()
assertion to make sure the input and output are supported in this expression.
|
abstract BeamSqlPrimitive |
evaluate(BeamRecord inputRow,
BoundedWindow window)
Apply input record
BeamRecord with BoundedWindow to this expression,
the output value is wrapped with BeamSqlPrimitive . |
java.util.List<BeamSqlExpression> |
getOperands() |
SqlTypeName |
getOutputType() |
int |
numberOfOperands() |
BeamSqlExpression |
op(int idx) |
SqlTypeName |
opType(int idx) |
<T> T |
opValueEvaluated(int idx,
BeamRecord row,
BoundedWindow window) |
protected java.util.List<BeamSqlExpression> operands
protected SqlTypeName outputType
protected BeamSqlExpression()
public BeamSqlExpression(java.util.List<BeamSqlExpression> operands, SqlTypeName outputType)
public BeamSqlExpression op(int idx)
public SqlTypeName opType(int idx)
public <T> T opValueEvaluated(int idx, BeamRecord row, BoundedWindow window)
public abstract boolean accept()
public abstract BeamSqlPrimitive evaluate(BeamRecord inputRow, BoundedWindow window)
BeamRecord
with BoundedWindow
to this expression,
the output value is wrapped with BeamSqlPrimitive
.public java.util.List<BeamSqlExpression> getOperands()
public SqlTypeName getOutputType()
public int numberOfOperands()