org.eigenbase.sql.fun
Class SqlCoalesceFunction

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

public class SqlCoalesceFunction
extends SqlFunction

The COALESCE function.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/fun/SqlCoalesceFunction.java#14 $
Author:
Wael Chatila

Field Summary
 
Fields inherited from class org.eigenbase.sql.SqlOperator
MaxPrec, NL
 
Constructor Summary
SqlCoalesceFunction()
           
 
Method Summary
 SqlNode rewriteCall(SqlValidator validator, SqlCall call)
          Rewrites a call to this operator.
 
Methods inherited from class org.eigenbase.sql.SqlFunction
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, getSyntax, 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, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isName, leftPrec, preValidateCall, requiresDecimalExpansion, rightPrec, toString, unparseListClause, unparseListClause, validateOperands
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SqlCoalesceFunction

public SqlCoalesceFunction()
Method Detail

rewriteCall

public SqlNode rewriteCall(SqlValidator validator,
                           SqlCall call)
Description copied from class: SqlOperator
Rewrites a call to this operator. Some operators are implemented as trivial rewrites (e.g. NULLIF becomes CASE). However, we don't do this at createCall time because we want to preserve the original SQL syntax as much as possible; instead, we do this before the call is validated (so the trivial operator doesn't need its own implementation of type derivation methods). The default implementation is to just return the original call without any rewrite.

Overrides:
rewriteCall in class SqlOperator
call - to be rewritten
Returns:
rewritten call