public class RexCallBinding extends SqlOperatorBinding
RexCallBinding implements SqlOperatorBinding by
referring to an underlying collection of RexNode operands.typeFactory| Constructor and Description |
|---|
RexCallBinding(RelDataTypeFactory typeFactory,
SqlOperator sqlOperator,
List<? extends RexNode> operands,
List<RelCollation> inputCollations) |
| Modifier and Type | Method and Description |
|---|---|
static RexCallBinding |
create(RelDataTypeFactory typeFactory,
RexCall call,
List<RelCollation> inputCollations)
Creates a binding of the appropriate type.
|
static RexCallBinding |
create(RelDataTypeFactory typeFactory,
RexCall call,
@Nullable RexProgram program,
List<RelCollation> inputCollations)
Creates a binding of the appropriate type, optionally with a program.
|
int |
getIntLiteralOperand(int ordinal)
Gets the integer value of a numeric literal operand.
|
int |
getOperandCount()
Returns the number of bound operands.
|
<T> T |
getOperandLiteralValue(int ordinal,
Class<T> clazz)
Gets the value of a literal operand.
|
SqlMonotonicity |
getOperandMonotonicity(int ordinal)
Gets the monotonicity of a bound operand.
|
RelDataType |
getOperandType(int ordinal)
Gets the type of a bound operand.
|
@Nullable String |
getStringLiteralOperand(int ordinal)
Gets the string value of a string literal operand.
|
boolean |
isOperandLiteral(int ordinal,
boolean allowCast)
Determines whether an operand is a literal.
|
boolean |
isOperandNull(int ordinal,
boolean allowCast)
Determines whether a bound operand is NULL.
|
CalciteException |
newError(org.apache.calcite.runtime.Resources.ExInst<SqlValidatorException> e)
Wraps a validation error with context appropriate to this operator call.
|
List<RexNode> |
operands() |
collectOperandTypes, getColumnListParamInfo, getCursorOperand, getGroupCount, getOperandLiteralValue, getOperandLiteralValue, getOperator, getTypeFactory, hasFilterpublic RexCallBinding(RelDataTypeFactory typeFactory, SqlOperator sqlOperator, List<? extends RexNode> operands, List<RelCollation> inputCollations)
public static RexCallBinding create(RelDataTypeFactory typeFactory, RexCall call, List<RelCollation> inputCollations)
public static RexCallBinding create(RelDataTypeFactory typeFactory, RexCall call, @Nullable RexProgram program, List<RelCollation> inputCollations)
public @Nullable String getStringLiteralOperand(int ordinal)
SqlOperatorBindinggetStringLiteralOperand in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic int getIntLiteralOperand(int ordinal)
SqlOperatorBindinggetIntLiteralOperand in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic <T> T getOperandLiteralValue(int ordinal,
Class<T> clazz)
SqlOperatorBindingCases:
NlsString.
BigDecimal.
SqlIntervalQualifiergetOperandLiteralValue in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestclazz - Desired valued typepublic SqlMonotonicity getOperandMonotonicity(int ordinal)
SqlOperatorBindinggetOperandMonotonicity in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic boolean isOperandNull(int ordinal,
boolean allowCast)
SqlOperatorBindingThis is only relevant for SQL validation.
isOperandNull in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestallowCast - whether to regard CAST(constant) as a constantpublic boolean isOperandLiteral(int ordinal,
boolean allowCast)
SqlOperatorBindingisOperandLiteral in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestallowCast - whether to regard CAST(literal) as a literalpublic int getOperandCount()
SqlOperatorBindinggetOperandCount in class SqlOperatorBindingpublic RelDataType getOperandType(int ordinal)
SqlOperatorBindinggetOperandType in class SqlOperatorBindingordinal - zero-based ordinal of operand of interestpublic CalciteException newError(org.apache.calcite.runtime.Resources.ExInst<SqlValidatorException> e)
SqlOperatorBindingnewError in class SqlOperatorBindinge - Validation error, not nullCopyright © 2012-2022 Apache Software Foundation. All Rights Reserved.