net.sf.farrago.rng
Class FarragoRngNextRandomIntOperator
java.lang.Object
org.eigenbase.sql.SqlOperator
org.eigenbase.sql.SqlFunction
net.sf.farrago.rng.FarragoRngNextRandomIntOperator
public class FarragoRngNextRandomIntOperator
- extends SqlFunction
FarragoRngNextRandomIntOperator defines the SqlOperator for the
NEXT_RANDOM_INT pseudo-function.
- Version:
- $Id: //open/dev/farrago/examples/rng/src/net/sf/farrago/rng/FarragoRngNextRandomIntOperator.java#11 $
- Author:
- John V. Sichi
Methods inherited from class org.eigenbase.sql.SqlOperator |
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands |
FarragoRngNextRandomIntOperator
public FarragoRngNextRandomIntOperator()
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.eigenbase.sql.validate.SqlValidator, org.eigenbase.sql.validate.SqlValidatorScope)
;
but note that some sub-classes of SqlCall
never call this method.
- Overrides:
validateCall
in class SqlFunction
- 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:
SqlNode.validateExpr(SqlValidator, SqlValidatorScope)
,
SqlOperator.deriveType(SqlValidator, SqlValidatorScope, SqlCall)
unparse
public void unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
- 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.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int)
.
- Overrides:
unparse
in class SqlFunction