Package org.apache.calcite.sql
Class SqlMeasureOperator
java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlSpecialOperator
org.apache.calcite.sql.SqlInternalOperator
org.apache.calcite.sql.SqlMeasureOperator
The
MEASURE wraps an expression in the SELECT clause and tags
it as a measure.
For example, the SQL 'x + 1 AS MEASURE y' becomes the
SqlNode AST 'AS(MEASURE(x + 1), y)'.
The operator is not used in RexNode.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.sql.SqlSpecialOperator
SqlSpecialOperator.ReduceResult, SqlSpecialOperator.TokenSequence -
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlOperator
kind, MDX_PRECEDENCE, NL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the syntactic type of this operator, never null.voidWrites a SQL representation of a call to this operator to a writer, including parentheses if the operators on either side are of greater precedence.Methods inherited from class org.apache.calcite.sql.SqlInternalOperator
deriveTypeMethods inherited from class org.apache.calcite.sql.SqlSpecialOperator
reduceExprMethods inherited from class org.apache.calcite.sql.SqlOperator
acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getSqlCallFactory, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
-
Constructor Details
-
SqlMeasureOperator
public SqlMeasureOperator()Creates a MEASURE operator.
-
-
Method Details
-
getSyntax
Description copied from class:SqlOperatorReturns the syntactic type of this operator, never null.- Overrides:
getSyntaxin classSqlInternalOperator
-
unparse
Description copied from class:SqlOperatorWrites 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:
unparsein classSqlOperator
-