public class BeamSqlPrimitive<T> extends BeamSqlExpression
BeamSqlPrimitive is a special, self-reference BeamSqlExpression.
It holds the value, and return it directly during evaluate(Row, BoundedWindow).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)
Apply input record
Row with BoundedWindow to this expression,
the output value is wrapped with BeamSqlPrimitive. |
boolean |
getBoolean() |
byte |
getByte() |
java.util.Date |
getDate() |
java.math.BigDecimal |
getDecimal() |
double |
getDouble() |
float |
getFloat() |
int |
getInteger() |
long |
getLong() |
SqlTypeName |
getOutputType() |
short |
getShort() |
java.lang.String |
getString() |
T |
getValue() |
static <T> BeamSqlPrimitive<T> |
of(SqlTypeName outputType,
T value)
A builder function to create from Type and value directly.
|
getOperands, numberOfOperands, op, opType, opValueEvaluatedpublic static <T> BeamSqlPrimitive<T> of(SqlTypeName outputType, T value)
public SqlTypeName getOutputType()
getOutputType in class BeamSqlExpressionpublic 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 java.util.Date getDate()
public java.math.BigDecimal getDecimal()
public boolean accept()
BeamSqlExpressionaccept in class BeamSqlExpressionpublic BeamSqlPrimitive<T> evaluate(Row inputRow, BoundedWindow window)
BeamSqlExpressionRow with BoundedWindow to this expression,
the output value is wrapped with BeamSqlPrimitive.evaluate in class BeamSqlExpression