|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlSpecialOperator
org.eigenbase.sql.fun.SqlMultisetQueryConstructor
public class SqlMultisetQueryConstructor
Definition of the SQL:2003 standard MULTISET query constructor,
MULTISET (<query>).
SqlMultisetValueConstructor| Field Summary |
|---|
| Fields inherited from class org.eigenbase.sql.SqlOperator |
|---|
MaxPrec, NL |
| Constructor Summary | |
|---|---|
SqlMultisetQueryConstructor()
|
|
| Method Summary | |
|---|---|
boolean |
argumentMustBeScalar(int ordinal)
Returns whether the ordinalth argument to this operator must
be scalar (as opposed to a query). |
boolean |
checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
Checks that the operand values in a SqlCall to this operator are
valid. |
RelDataType |
deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Derives the type of a call to this operator. |
private RelDataType |
getComponentType(RelDataTypeFactory typeFactory,
RelDataType[] argTypes)
|
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,
SqlNode[] operands,
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. |
| Methods inherited from class org.eigenbase.sql.SqlSpecialOperator |
|---|
getSyntax, reduceExpr |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SqlMultisetQueryConstructor()
| Method Detail |
|---|
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlOperatorSqlReturnTypeInference to the constructor.
inferReturnType in class SqlOperatoropBinding - description of invocation (not necessarily a SqlCall)
private RelDataType getComponentType(RelDataTypeFactory typeFactory,
RelDataType[] argTypes)
public boolean checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
SqlOperatorSqlCall to this operator are
valid. Subclasses must either override this method or supply an instance
of SqlOperandTypeChecker to the constructor.
checkOperandTypes in class SqlOperatorcallBinding - description of callthrowOnFailure - whether to throw an exception if check fails
(otherwise returns false in that case)
public RelDataType deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
SqlOperatorThis method is an intrinsic part of the validation process so, unlike
SqlOperator.inferReturnType(org.eigenbase.sql.SqlOperatorBinding), specific operators would not typically override
this method.
deriveType in class SqlOperatorvalidator - Validatorscope - Scope of validationcall - Call to this operator
public void unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
SqlOperatorThe default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int).
unparse in class SqlSpecialOperatorpublic boolean argumentMustBeScalar(int ordinal)
SqlOperatorordinalth 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 subquery, which must have one column and return at most one row.
Operators such as SELECT and EXISTS override
this method.
argumentMustBeScalar in class SqlOperator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||