public class SqlUnnestOperator extends SqlFunctionalOperator
UNNEST
operator.SqlSpecialOperator.ReduceResult, SqlSpecialOperator.TokenSequence
Modifier and Type | Field and Description |
---|---|
static String |
MAP_KEY_COLUMN_NAME |
static String |
MAP_VALUE_COLUMN_NAME |
static String |
ORDINALITY_COLUMN_NAME |
boolean |
withOrdinality
Whether
WITH ORDINALITY was specified. |
kind, MDX_PRECEDENCE, NL
Constructor and Description |
---|
SqlUnnestOperator(boolean withOrdinality) |
Modifier and Type | Method and Description |
---|---|
boolean |
argumentMustBeScalar(int ordinal)
Returns whether the
ordinal th argument to this operator must
be scalar (as opposed to a query). |
RelDataType |
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of an invocation of this operator; only called
after the number and types of operands have already been validated.
|
void |
unparse(SqlWriter writer,
SqlCall call,
int leftPrec,
int rightPrec)
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.
|
getSyntax, reduceExpr
acceptCall, acceptCall, adjustType, allowsFraming, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, leftPrec, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands
public final boolean withOrdinality
WITH ORDINALITY
was specified.
If so, the returned records include a column ORDINALITY
.
public static final String ORDINALITY_COLUMN_NAME
public static final String MAP_KEY_COLUMN_NAME
public static final String MAP_VALUE_COLUMN_NAME
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlOperator
SqlReturnTypeInference
to the constructor.inferReturnType
in class SqlOperator
opBinding
- description of invocation (not necessarily a
SqlCall
)public void unparse(SqlWriter writer, SqlCall call, int leftPrec, int rightPrec)
SqlOperator
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)
.
unparse
in class SqlFunctionalOperator
public boolean argumentMustBeScalar(int ordinal)
SqlOperator
ordinal
th argument to this operator must
be scalar (as opposed to a query).
If true (the default), the validator will attempt to convert the argument into a scalar sub-query, which must have one column and return at most one row.
Operators such as SELECT
and EXISTS
override
this method.
argumentMustBeScalar
in class SqlOperator
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.