|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.UnaryOperatorNode
org.apache.derby.impl.sql.compile.UnaryComparisonOperatorNode
org.apache.derby.impl.sql.compile.IsNullNode
This node represents either a unary IS NULL or IS NOT NULL comparison operator
Field Summary | |
(package private) java.lang.Object |
nullValue
|
Fields inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
IS_NULL, methodName, NOT, operand, operator, UNARY_MINUS, UNARY_PLUS |
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode |
clause, dataTypeServices, IN_HAVING_CLAUSE, IN_SELECT_LIST, IN_UNKNOWN_CLAUSE, IN_WHERE_CLAUSE, transformed |
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset |
Fields inherited from interface org.apache.derby.impl.sql.compile.RelationalOperator |
EQUALS_RELOP, GREATER_EQUALS_RELOP, GREATER_THAN_RELOP, IS_NOT_NULL_RELOP, IS_NULL_RELOP, LESS_EQUALS_RELOP, LESS_THAN_RELOP, NOT_EQUALS_RELOP |
Constructor Summary | |
IsNullNode()
|
Method Summary | |
(package private) void |
bindParameter()
Bind a ? |
boolean |
compareWithKnownConstant(Optimizable optTable,
boolean considerParameters)
Return whether this operator compares the given Optimizable with a constant whose value is known at compile time. |
boolean |
equalsComparisonWithConstantExpression(Optimizable optTable)
Return whether this operator is an equality comparison of the given optimizable with a constant expression. |
void |
generateNegate(MethodBuilder mb,
Optimizable optTable)
Generate an expression that evaluates to true if the result of the comparison should be negated. |
void |
generateOperator(MethodBuilder mb,
Optimizable optTable)
Generate the comparison operator for this RelationalOperator. |
DataValueDescriptor |
getCompareValue(Optimizable optTable)
Return an Object representing the known value that this relational operator is comparing to a column in the given Optimizable. |
(package private) UnaryOperatorNode |
getNegation(ValueNode operand)
Negate the comparison. |
int |
getOperator()
Return the operator (as an int) for this RelationalOperator. |
java.lang.String |
getReceiverInterfaceName()
null operators are defined on DataValueDescriptor. |
int |
getStartOperator(Optimizable optTable)
Get the start operator for a scan (at the store level) for this RelationalOperator. |
int |
getStopOperator(Optimizable optTable)
Get the stop operator for a scan (at the store level) for this RelationalOperator. |
RelationalOperator |
getTransitiveSearchClause(ColumnReference otherCR)
Return a relational operator which matches the current one but with the passed in ColumnReference as the (left) operand. |
private boolean |
isNotNullNode()
|
private boolean |
isNullNode()
|
boolean |
isRelationalOperator()
Returns true if this ValueNode is a relational operator. |
boolean |
optimizableEqualityNode(Optimizable optTable,
int columnNumber,
boolean isNullOkay)
Return true if the predicate represents an optimizable equality node. |
double |
selectivity(Optimizable optTable)
IS NULL is like =, so should have the same selectivity |
void |
setNodeType(int nodeType)
Set the node type for this node. |
boolean |
usefulStartKey(Optimizable optTable)
Tell whether this relop is a useful start key for the given table. |
boolean |
usefulStopKey(Optimizable optTable)
Tell whether this relop is a useful stop key for the given table. |
Methods inherited from class org.apache.derby.impl.sql.compile.UnaryComparisonOperatorNode |
bindComparisonOperator, bindExpression, eliminateNots, generateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getColumnOperand, getExpressionOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison |
Methods inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
accept, bindUnaryOperator, categorize, constantExpression, generateExpression, getOperand, getOperatorString, getOrderableVariantType, init, init, isConstantExpression, preprocess, printSubNodes, remapColumnReferencesToExpressions, setClause, setMethodName, setOperator, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.derby.impl.sql.compile.RelationalOperator |
generateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getColumnOperand, getExpressionOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison |
Field Detail |
java.lang.Object nullValue
Constructor Detail |
public IsNullNode()
Method Detail |
public void setNodeType(int nodeType)
QueryTreeNode
setNodeType
in class QueryTreeNode
nodeType
- The node type.
UnaryOperatorNode getNegation(ValueNode operand) throws StandardException
getNegation
in class UnaryComparisonOperatorNode
operand
- The operand of the operator
StandardException
- Thrown on errorvoid bindParameter() throws StandardException
bindParameter
in class UnaryOperatorNode
StandardException
- Thrown on errorpublic boolean usefulStartKey(Optimizable optTable)
RelationalOperator
usefulStartKey
in interface RelationalOperator
optTable
- The Optimizable table for which we want to know
whether this is a useful start key.
RelationalOperator.usefulStartKey(org.apache.derby.iapi.sql.compile.Optimizable)
public boolean usefulStopKey(Optimizable optTable)
RelationalOperator
usefulStopKey
in interface RelationalOperator
optTable
- The Optimizable table for which we want to know
whether this is a useful stop key.
RelationalOperator.usefulStopKey(org.apache.derby.iapi.sql.compile.Optimizable)
public int getStartOperator(Optimizable optTable)
RelationalOperator
getStartOperator
in interface RelationalOperator
getStartOperator
in class UnaryComparisonOperatorNode
RelationalOperator.getStartOperator(org.apache.derby.iapi.sql.compile.Optimizable)
public int getStopOperator(Optimizable optTable)
RelationalOperator
getStopOperator
in interface RelationalOperator
getStopOperator
in class UnaryComparisonOperatorNode
RelationalOperator.getStopOperator(org.apache.derby.iapi.sql.compile.Optimizable)
public void generateOperator(MethodBuilder mb, Optimizable optTable)
RelationalOperator
generateOperator
in interface RelationalOperator
mb
- The method the generated code is to go intooptTable
- The optimizable table we're doing the scan on.RelationalOperator.generateOperator(org.apache.derby.iapi.services.compiler.MethodBuilder, org.apache.derby.iapi.sql.compile.Optimizable)
public void generateNegate(MethodBuilder mb, Optimizable optTable)
RelationalOperator
generateNegate
in interface RelationalOperator
mb
- The method the generated code is to go intooptTable
- The Optimizable table the Qualifier will qualifyRelationalOperator.generateNegate(org.apache.derby.iapi.services.compiler.MethodBuilder, org.apache.derby.iapi.sql.compile.Optimizable)
public int getOperator()
RelationalOperator
getOperator
in interface RelationalOperator
RelationalOperator.getOperator()
public boolean compareWithKnownConstant(Optimizable optTable, boolean considerParameters)
RelationalOperator
compareWithKnownConstant
in interface RelationalOperator
RelationalOperator.compareWithKnownConstant(org.apache.derby.iapi.sql.compile.Optimizable, boolean)
public DataValueDescriptor getCompareValue(Optimizable optTable) throws StandardException
RelationalOperator
getCompareValue
in interface RelationalOperator
StandardException
- Thrown on errorRelationalOperator.getCompareValue(org.apache.derby.iapi.sql.compile.Optimizable)
public boolean equalsComparisonWithConstantExpression(Optimizable optTable)
RelationalOperator
equalsComparisonWithConstantExpression
in interface RelationalOperator
RelationalOperator.equalsComparisonWithConstantExpression(org.apache.derby.iapi.sql.compile.Optimizable)
public RelationalOperator getTransitiveSearchClause(ColumnReference otherCR) throws StandardException
RelationalOperator
getTransitiveSearchClause
in interface RelationalOperator
otherCR
- The ColumnReference for the new (left) operand.
StandardException
- thrown on errorRelationalOperator.getTransitiveSearchClause(org.apache.derby.impl.sql.compile.ColumnReference)
public java.lang.String getReceiverInterfaceName()
getReceiverInterfaceName
in class UnaryOperatorNode
public double selectivity(Optimizable optTable)
selectivity
in class ValueNode
private boolean isNullNode()
private boolean isNotNullNode()
public boolean isRelationalOperator()
ValueNode
isRelationalOperator
in class ValueNode
ValueNode.isRelationalOperator()
public boolean optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay)
ValueNode
optimizableEqualityNode
in class ValueNode
optTable
- the table being optimized. Column reference must be from
this table.columnNumber
- the column number. One of the operands of this
predicate must be the column number specified by optTable/columnNumberisNullOkay
- if set to true we also consider IS NULL predicates;
otherwise consider only = predicates.ValueNode.optimizableEqualityNode(org.apache.derby.iapi.sql.compile.Optimizable, int, boolean)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |