org.eigenbase.sql
Class SqlPrefixOperator

java.lang.Object
  extended by org.eigenbase.sql.SqlOperator
      extended by org.eigenbase.sql.SqlPrefixOperator
Direct Known Subclasses:
SqlNewOperator, SqlProcedureCallOperator

public class SqlPrefixOperator
extends SqlOperator

A unary operator.


Field Summary
 
Fields inherited from class org.eigenbase.sql.SqlOperator
MaxPrec, NL
 
Constructor Summary
SqlPrefixOperator(String name, SqlKind kind, int prec, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
           
 
Method Summary
protected  RelDataType adjustType(SqlValidator validator, SqlCall call, RelDataType type)
          Validates and determines coercibility and resulting collation name of binary operator if needed.
 SqlMonotonicity getMonotonicity(SqlCall call, SqlValidatorScope scope)
          Returns whether this operator is monotonic.
 String getSignatureTemplate(int operandsCount)
          Returns a template describing how the operator signature is to be built.
 SqlSyntax getSyntax()
          Returns the syntactic type of this operator.
 
Methods inherited from class org.eigenbase.sql.SqlOperator
acceptCall, acceptCall, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, deriveType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SqlPrefixOperator

public SqlPrefixOperator(String name,
                         SqlKind kind,
                         int prec,
                         SqlReturnTypeInference returnTypeInference,
                         SqlOperandTypeInference operandTypeInference,
                         SqlOperandTypeChecker operandTypeChecker)
Method Detail

getSyntax

public SqlSyntax getSyntax()
Description copied from class: SqlOperator
Returns the syntactic type of this operator.

Specified by:
getSyntax in class SqlOperator

getSignatureTemplate

public String getSignatureTemplate(int operandsCount)
Description copied from class: SqlOperator
Returns a template describing how the operator signature is to be built. E.g for the binary + operator the template looks like "{1} {0} {2}" {0} is the operator, subsequent numbers are operands.

Overrides:
getSignatureTemplate in class SqlOperator
Parameters:
operandsCount - is used with functions that can take a variable number of operands
Returns:
signature template, or null to indicate that a default template will suffice

adjustType

protected RelDataType adjustType(SqlValidator validator,
                                 SqlCall call,
                                 RelDataType type)
Description copied from class: SqlOperator
Validates and determines coercibility and resulting collation name of binary operator if needed.

Overrides:
adjustType in class SqlOperator

getMonotonicity

public SqlMonotonicity getMonotonicity(SqlCall call,
                                       SqlValidatorScope scope)
Description copied from class: SqlOperator
Returns whether this operator is monotonic.

Default implementation returns SqlMonotonicity.NotMonotonic.

Overrides:
getMonotonicity in class SqlOperator
Parameters:
call - Call to this operator
scope - Scope in which the call occurs