public class BeamSqlPrimitive<T> extends BeamSqlExpression
BeamSqlPrimitive
is a special, self-reference BeamSqlExpression
. It holds the
value, and return it directly during BeamSqlExpression.evaluate(Row, BoundedWindow,
BeamSqlExpressionEnvironment)
.operands, outputType
Modifier and Type | Method and Description |
---|---|
boolean |
accept()
assertion to make sure the input and output are supported in this expression.
|
BeamSqlPrimitive<T> |
evaluate(Row inputRow,
BoundedWindow window,
BeamSqlExpressionEnvironment env)
Apply input record
Row with BoundedWindow to this expression, the output value
is wrapped with BeamSqlPrimitive . |
boolean |
getBoolean() |
byte |
getByte() |
ReadableInstant |
getDate() |
java.math.BigDecimal |
getDecimal() |
double |
getDouble() |
float |
getFloat() |
int |
getInteger() |
long |
getLong() |
org.apache.calcite.sql.type.SqlTypeName |
getOutputType() |
short |
getShort() |
java.lang.String |
getString() |
T |
getValue() |
static <T> BeamSqlPrimitive<T> |
of(org.apache.calcite.sql.type.SqlTypeName outputType,
T value)
A builder function to create from Type and value directly.
|
java.lang.String |
toString() |
getOperands, numberOfOperands, op, opType, opValueEvaluated
public static <T> BeamSqlPrimitive<T> of(org.apache.calcite.sql.type.SqlTypeName outputType, T value)
public org.apache.calcite.sql.type.SqlTypeName getOutputType()
getOutputType
in class BeamSqlExpression
public T getValue()
public long getLong()
public double getDouble()
public float getFloat()
public int getInteger()
public short getShort()
public byte getByte()
public boolean getBoolean()
public java.lang.String getString()
public ReadableInstant getDate()
public java.math.BigDecimal getDecimal()
public boolean accept()
BeamSqlExpression
accept
in class BeamSqlExpression
public BeamSqlPrimitive<T> evaluate(Row inputRow, BoundedWindow window, BeamSqlExpressionEnvironment env)
BeamSqlExpression
Row
with BoundedWindow
to this expression, the output value
is wrapped with BeamSqlPrimitive
.evaluate
in class BeamSqlExpression
public java.lang.String toString()
toString
in class java.lang.Object