org.eigenbase.sql.fun
Class SqlAbstractTimeFunction

java.lang.Object
  extended by org.eigenbase.sql.SqlOperator
      extended by org.eigenbase.sql.SqlFunction
          extended by org.eigenbase.sql.fun.SqlAbstractTimeFunction

public class SqlAbstractTimeFunction
extends SqlFunction

Base class for time functions such as "LOCALTIME", "LOCALTIME(n)".

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlAbstractTimeFunction.java#13 $
Author:
John V. Sichi

Field Summary
private static SqlOperandTypeChecker otcCustom
           
private  SqlTypeName typeName
           
 
Fields inherited from class org.eigenbase.sql.SqlOperator
MaxPrec, NL
 
Constructor Summary
protected SqlAbstractTimeFunction(String name, SqlTypeName typeName)
           
 
Method Summary
 SqlMonotonicity getMonotonicity(SqlCall call, SqlValidatorScope scope)
          Returns whether this operator is monotonic.
 SqlSyntax getSyntax()
          Returns the syntactic type of this operator.
 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.
 boolean isDynamicFunction()
           
 
Methods inherited from class org.eigenbase.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, isQuantifierAllowed, unparse, validateCall, validateQuantifier
 
Methods inherited from class org.eigenbase.sql.SqlOperator
acceptCall, acceptCall, adjustType, argumentMustBeScalar, checkOperandCount, checkOperandTypes, createCall, createCall, createCall, createCall, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, isAggregator, isDeterministic, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

otcCustom

private static final SqlOperandTypeChecker otcCustom

typeName

private final SqlTypeName typeName
Constructor Detail

SqlAbstractTimeFunction

protected SqlAbstractTimeFunction(String name,
                                  SqlTypeName typeName)
Method Detail

getSyntax

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

Overrides:
getSyntax in class SqlFunction

inferReturnType

public RelDataType inferReturnType(SqlOperatorBinding opBinding)
Description copied from class: SqlOperator
Infers the return type of an invocation of this operator; only called after the number and types of operands have already been validated. Subclasses must either override this method or supply an instance of SqlReturnTypeInference to the constructor.

Overrides:
inferReturnType in class SqlOperator
Parameters:
opBinding - description of invocation (not necessarily a SqlCall)
Returns:
inferred return type

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

isDynamicFunction

public boolean isDynamicFunction()
Overrides:
isDynamicFunction in class SqlOperator
Returns:
true iff it is unsafe to cache query plans referencing this operator; false is assumed by default