Class VariantAwareItemOperator
- java.lang.Object
-
- org.apache.calcite.sql.SqlOperator
-
- org.apache.calcite.sql.SqlSpecialOperator
-
- org.apache.flink.cdc.runtime.parser.metadata.VariantAwareItemOperator
-
public class VariantAwareItemOperator extends org.apache.calcite.sql.SqlSpecialOperatorA variant-aware implementation of the ITEM operator.This extends the standard Calcite ITEM operator to support VARIANT type. For ARRAY, MAP, and ROW types, it delegates to the standard Calcite ITEM operator.
When accessing elements of a VARIANT:
- VARIANT[INTEGER] - accesses array elements (1-based index)
- VARIANT[STRING] - accesses object fields by name
The return type is always VARIANT when the source is VARIANT.
-
-
Constructor Summary
Constructors Constructor Description VariantAwareItemOperator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckOperandTypes(org.apache.calcite.sql.SqlCallBinding callBinding, boolean throwOnFailure)StringgetAllowedSignatures(String opName)org.apache.calcite.sql.SqlOperandCountRangegetOperandCountRange()org.apache.calcite.rel.type.RelDataTypeinferReturnType(org.apache.calcite.sql.SqlOperatorBinding opBinding)voidunparse(org.apache.calcite.sql.SqlWriter writer, org.apache.calcite.sql.SqlCall call, int leftPrec, int rightPrec)-
Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
-
-
-
-
Method Detail
-
getOperandCountRange
public org.apache.calcite.sql.SqlOperandCountRange getOperandCountRange()
- Overrides:
getOperandCountRangein classorg.apache.calcite.sql.SqlOperator
-
checkOperandTypes
public boolean checkOperandTypes(org.apache.calcite.sql.SqlCallBinding callBinding, boolean throwOnFailure)- Overrides:
checkOperandTypesin classorg.apache.calcite.sql.SqlOperator
-
inferReturnType
public org.apache.calcite.rel.type.RelDataType inferReturnType(org.apache.calcite.sql.SqlOperatorBinding opBinding)
- Overrides:
inferReturnTypein classorg.apache.calcite.sql.SqlOperator
-
getAllowedSignatures
public String getAllowedSignatures(String opName)
- Overrides:
getAllowedSignaturesin classorg.apache.calcite.sql.SqlOperator
-
unparse
public void unparse(org.apache.calcite.sql.SqlWriter writer, org.apache.calcite.sql.SqlCall call, int leftPrec, int rightPrec)- Overrides:
unparsein classorg.apache.calcite.sql.SqlOperator
-
-