|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sql.SqlOperator org.eigenbase.sql.SqlBinaryOperator
public class SqlBinaryOperator
SqlBinaryOperator
is a binary operator.
Field Summary |
---|
Fields inherited from class org.eigenbase.sql.SqlOperator |
---|
MaxPrec, NL |
Constructor Summary | |
---|---|
SqlBinaryOperator(String name,
SqlKind kind,
int prec,
boolean leftAssoc,
SqlReturnTypeInference returnTypeInference,
SqlOperandTypeInference operandTypeInference,
SqlOperandTypeChecker operandTypeChecker)
Creates a SqlBinaryOperator. |
Method Summary | |
---|---|
protected RelDataType |
adjustType(SqlValidator validator,
SqlCall call,
RelDataType type)
Validates and determines coercibility and resulting collation name of binary operator if needed. |
RelDataType |
deriveType(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call)
Derives the type of a call to this operator. |
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. |
(package private) boolean |
needsSpace()
Returns whether this operator should be surrounded by space when unparsed. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SqlBinaryOperator(String name, SqlKind kind, int prec, boolean leftAssoc, SqlReturnTypeInference returnTypeInference, SqlOperandTypeInference operandTypeInference, SqlOperandTypeChecker operandTypeChecker)
name
- Name of operatorkind
- Kindprec
- PrecedenceleftAssoc
- Left-associativityreturnTypeInference
- Strategy to infer return typeoperandTypeInference
- Strategy to infer operand typesoperandTypeChecker
- Validator for operand typesMethod Detail |
---|
public SqlSyntax getSyntax()
SqlOperator
getSyntax
in class SqlOperator
public String getSignatureTemplate(int operandsCount)
SqlOperator
getSignatureTemplate
in class SqlOperator
operandsCount
- is used with functions that can take a variable
number of operands
boolean needsSpace()
Returns true for most operators but false for the '.' operator; consider
x.y + 5 * 6
protected RelDataType adjustType(SqlValidator validator, SqlCall call, RelDataType type)
SqlOperator
adjustType
in class SqlOperator
public RelDataType deriveType(SqlValidator validator, SqlValidatorScope scope, SqlCall call)
SqlOperator
This method is an intrinsic part of the validation process so, unlike
SqlOperator.inferReturnType(org.eigenbase.sql.SqlOperatorBinding)
, specific operators would not typically override
this method.
deriveType
in class SqlOperator
validator
- Validatorscope
- Scope of validationcall
- Call to this operator
public SqlMonotonicity getMonotonicity(SqlCall call, SqlValidatorScope scope)
SqlOperator
Default implementation returns SqlMonotonicity.NotMonotonic
.
getMonotonicity
in class SqlOperator
call
- 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 |