|
|||||||||
| 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.fun.SqlCastFunction
public class SqlCastFunction
SqlCastFunction. Note that the std functions are really singleton objects, because they always get fetched via the StdOperatorTable. So you can't store any local info in the class and hence the return type data is maintained in operand[1] through the validation phase.
| Nested Class Summary | |
|---|---|
private class |
SqlCastFunction.TypeFamilyCast
|
| Field Summary | |
|---|---|
private Set<SqlCastFunction.TypeFamilyCast> |
nonMonotonicPreservingCasts
|
| Fields inherited from class org.eigenbase.sql.SqlOperator |
|---|
MaxPrec, NL |
| Constructor Summary | |
|---|---|
SqlCastFunction()
|
|
| Method Summary | |
|---|---|
boolean |
checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
Makes sure that the number and types of arguments are allowable. |
private Set<SqlCastFunction.TypeFamilyCast> |
createNonMonotonicPreservingCasts()
|
SqlMonotonicity |
getMonotonicity(SqlCall call,
SqlValidatorScope scope)
Returns whether this operator is monotonic. |
SqlOperandCountRange |
getOperandCountRange()
Returns a constraint on the number of operands expected by this operator. |
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. |
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. |
private boolean |
isMonotonicPreservingCast(RelDataTypeFamily castFrom,
RelDataTypeFamily castTo)
|
void |
unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
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. |
| Methods inherited from class org.eigenbase.sql.SqlFunction |
|---|
deriveType, getFunctionType, getNameAsId, getParamTypes, getSqlIdentifier, isQuantifierAllowed, validateCall, validateQuantifier |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final Set<SqlCastFunction.TypeFamilyCast> nonMonotonicPreservingCasts
| Constructor Detail |
|---|
public SqlCastFunction()
| Method Detail |
|---|
private Set<SqlCastFunction.TypeFamilyCast> createNonMonotonicPreservingCasts()
private boolean isMonotonicPreservingCast(RelDataTypeFamily castFrom,
RelDataTypeFamily castTo)
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlOperatorSqlReturnTypeInference to the constructor.
inferReturnType in class SqlOperatoropBinding - description of invocation (not necessarily a SqlCall)
public String getSignatureTemplate(int operandsCount)
SqlOperator
getSignatureTemplate in class SqlOperatoroperandsCount - is used with functions that can take a variable
number of operands
public SqlOperandCountRange getOperandCountRange()
SqlOperatorSqlOperandTypeChecker associated with this
operator.
getOperandCountRange in class SqlOperator
public boolean checkOperandTypes(SqlCallBinding callBinding,
boolean throwOnFailure)
checkOperandTypes in class SqlOperatorcallBinding - description of callthrowOnFailure - whether to throw an exception if check fails
(otherwise returns false in that case)
public SqlSyntax getSyntax()
SqlOperator
getSyntax in class SqlFunction
public void unparse(SqlWriter writer,
SqlNode[] operands,
int leftPrec,
int rightPrec)
SqlOperatorThe default implementation of this method delegates to SqlSyntax.unparse(org.eigenbase.sql.SqlWriter, org.eigenbase.sql.SqlOperator, org.eigenbase.sql.SqlNode[], int, int).
unparse in class SqlFunction
public SqlMonotonicity getMonotonicity(SqlCall call,
SqlValidatorScope scope)
SqlOperatorDefault implementation returns SqlMonotonicity.NotMonotonic.
getMonotonicity in class SqlOperatorcall - Call to this operatorscope - Scope in which the call occurs
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||