Class SqlMatchRecognize.SqlMatchRecognizeOperator
- Enclosing class:
SqlMatchRecognize
-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL
-
Method Summary
Modifier and TypeMethodDescription<R> void
acceptCall
(SqlVisitor<R> visitor, SqlCall call, boolean onlyExpressions, SqlBasicVisitor.ArgHandler<R> argHandler) Accepts aSqlVisitor
, directing anSqlBasicVisitor.ArgHandler
to visit an operand of a call.createCall
(@Nullable SqlLiteral functionQualifier, SqlParserPos pos, @Nullable SqlNode... operands) Creates a call to this operator with an array of operands.Returns the syntactic type of this operator, never null.void
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.void
validateCall
(SqlCall call, SqlValidator validator, SqlValidatorScope scope, SqlValidatorScope operandScope) Validates a call to this operator.Methods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands
-
Field Details
-
INSTANCE
-
-
Method Details
-
getSyntax
Description copied from class:SqlOperator
Returns the syntactic type of this operator, never null.- Specified by:
getSyntax
in classSqlOperator
-
createCall
public SqlCall createCall(@Nullable SqlLiteral functionQualifier, SqlParserPos pos, @Nullable SqlNode... operands) Description copied from class:SqlOperator
Creates a call to this operator with an array of operands.The position of the resulting call is the union of the
pos
and the positions of all of the operands.- Overrides:
createCall
in classSqlOperator
- Parameters:
functionQualifier
- Function qualifier (e.g. "DISTINCT"), or nullpos
- Parser position of the identifier of the calloperands
- Array of operands
-
acceptCall
public <R> void acceptCall(SqlVisitor<R> visitor, SqlCall call, boolean onlyExpressions, SqlBasicVisitor.ArgHandler<R> argHandler) Description copied from class:SqlOperator
Accepts aSqlVisitor
, directing anSqlBasicVisitor.ArgHandler
to visit an operand of a call.The argument handler allows fine control about how the operands are visited, and how the results are combined.
- Overrides:
acceptCall
in classSqlOperator
- Parameters:
visitor
- Visitorcall
- Call to visitonlyExpressions
- If true, ignores operands which are not expressions. For example, in the call to theAS
operatorargHandler
- Called for each operand
-
validateCall
public void validateCall(SqlCall call, SqlValidator validator, SqlValidatorScope scope, SqlValidatorScope operandScope) Description copied from class:SqlOperator
Validates a call to this operator.This method should not perform type-derivation or perform validation related related to types. That is done later, by
SqlOperator.deriveType(SqlValidator, SqlValidatorScope, SqlCall)
. This method should focus on structural validation.A typical implementation of this method first validates the operands, then performs some operator-specific logic. The default implementation just validates the operands.
This method is the default implementation of
SqlCall.validate(org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.validate.SqlValidatorScope)
; but note that some sub-classes ofSqlCall
never call this method.- Overrides:
validateCall
in classSqlOperator
- Parameters:
call
- the call to this operatorvalidator
- the active validatorscope
- validator scopeoperandScope
- validator scope in which to validate operands to this call; usually equal to scope, but not always because some operators introduce new scopes- See Also:
-
unparse
Description copied from class:SqlOperator
Writes a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.The default implementation of this method delegates to
SqlSyntax.unparse(org.apache.calcite.sql.SqlWriter, org.apache.calcite.sql.SqlOperator, org.apache.calcite.sql.SqlCall, int, int)
.- Overrides:
unparse
in classSqlOperator
-