|
|||||||||
| 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.SqlFunction
org.eigenbase.sql.SqlAggFunction
org.eigenbase.sql.SqlRankFunction
public class SqlRankFunction
Operator which aggregates sets of values into a result.
| Field Summary | |
|---|---|
private RelDataType |
type
|
| Fields inherited from class org.eigenbase.sql.SqlOperator |
|---|
MaxPrec, NL |
| Constructor Summary | |
|---|---|
SqlRankFunction(String name)
|
|
| Method Summary | |
|---|---|
SqlOperandCountRange |
getOperandCountRange()
Returns a constraint on the number of operands expected by this operator. |
RelDataType[] |
getParameterTypes(RelDataTypeFactory typeFactory)
Returns the parameter types accepted by this Aggregation. |
RelDataType |
getReturnType(RelDataTypeFactory typeFactory)
Returns the type of the result yielded by this Aggregation. |
boolean |
isAggregator()
Returns whether this operator is an aggregate function. |
void |
validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope)
Validates a call to this operator. |
| Methods inherited from class org.eigenbase.sql.SqlAggFunction |
|---|
getStartParameterTypes, isQuantifierAllowed |
| Methods inherited from class org.eigenbase.sql.SqlFunction |
|---|
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, unparse, validateQuantifier |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eigenbase.rel.Aggregation |
|---|
getName |
| Field Detail |
|---|
private final RelDataType type
| Constructor Detail |
|---|
public SqlRankFunction(String name)
| Method Detail |
|---|
public SqlOperandCountRange getOperandCountRange()
SqlOperatorSqlOperandTypeChecker associated with this
operator.
getOperandCountRange in class SqlOperatorpublic RelDataType getReturnType(RelDataTypeFactory typeFactory)
Aggregation
typeFactory - Type factory to create the type
public RelDataType[] getParameterTypes(RelDataTypeFactory typeFactory)
Aggregation
typeFactory - Type factory to create the types
public boolean isAggregator()
SqlOperator
isAggregator in class SqlOperator
public void validateCall(SqlCall call,
SqlValidator validator,
SqlValidatorScope scope,
SqlValidatorScope operandScope)
SqlOperatorThis 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.eigenbase.sql.validate.SqlValidator, org.eigenbase.sql.validate.SqlValidatorScope);
but note that some sub-classes of SqlCall never call this method.
validateCall in class SqlAggFunctioncall - 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 scopesSqlNode.validateExpr(SqlValidator, SqlValidatorScope),
SqlOperator.deriveType(SqlValidator, SqlValidatorScope, SqlCall)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||