|
|||||||||
| 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.OperatorNode
org.apache.derby.impl.sql.compile.UnaryOperatorNode
org.apache.derby.impl.sql.compile.UnaryComparisonOperatorNode
org.apache.derby.impl.sql.compile.IsNullNode
public final class IsNullNode
This node represents either a unary IS NULL or IS NOT NULL comparison operator
| Field Summary | |
|---|---|
private DataValueDescriptor |
nullValue
|
| Fields inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
|---|
methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes, XMLPARSE_OP, XMLSERIALIZE_OP |
| Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode |
|---|
transformed |
| Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
|---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
| 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, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison |
| Methods inherited from class org.apache.derby.impl.sql.compile.UnaryOperatorNode |
|---|
acceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, generateExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, init, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toString |
| Methods inherited from class org.apache.derby.impl.sql.compile.OperatorNode |
|---|
pushSqlXmlUtil |
| 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, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison |
| Field Detail |
|---|
private DataValueDescriptor nullValue
| Constructor Detail |
|---|
public IsNullNode()
| Method Detail |
|---|
public void setNodeType(int nodeType)
QueryTreeNode
setNodeType in class QueryTreeNodenodeType - The node type.
UnaryOperatorNode getNegation(ValueNode operand)
throws StandardException
getNegation in class UnaryComparisonOperatorNodeoperand - The operand of the operator
StandardException - Thrown on error
void bindParameter()
throws StandardException
bindParameter in class UnaryOperatorNodeStandardException - Thrown on errorpublic boolean usefulStartKey(Optimizable optTable)
RelationalOperator
usefulStartKey in interface RelationalOperatoroptTable - 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 RelationalOperatoroptTable - 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 RelationalOperatorgetStartOperator in class UnaryComparisonOperatorNodeoptTable - The optimizable table we're doing the scan on.
This parameter is so we can tell which side of
the operator the table's column is on.
RelationalOperator.getStartOperator(org.apache.derby.iapi.sql.compile.Optimizable)public int getStopOperator(Optimizable optTable)
RelationalOperator
getStopOperator in interface RelationalOperatorgetStopOperator in class UnaryComparisonOperatorNodeoptTable - The optimizable table we're doing the scan on.
This parameter is so we can tell which side of
the operator the table's column is on.
RelationalOperator.getStopOperator(org.apache.derby.iapi.sql.compile.Optimizable)
public void generateOperator(MethodBuilder mb,
Optimizable optTable)
RelationalOperator
generateOperator in interface RelationalOperatormb - 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 RelationalOperatormb - 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 RelationalOperatorRelationalOperator.getOperator()
public boolean compareWithKnownConstant(Optimizable optTable,
boolean considerParameters)
RelationalOperator
compareWithKnownConstant in interface RelationalOperatorRelationalOperator.compareWithKnownConstant(org.apache.derby.iapi.sql.compile.Optimizable, boolean)
public DataValueDescriptor getCompareValue(Optimizable optTable)
throws StandardException
RelationalOperator
getCompareValue in interface RelationalOperatorStandardException - Thrown on errorRelationalOperator.getCompareValue(org.apache.derby.iapi.sql.compile.Optimizable)public boolean equalsComparisonWithConstantExpression(Optimizable optTable)
RelationalOperator
equalsComparisonWithConstantExpression in interface RelationalOperatorRelationalOperator.equalsComparisonWithConstantExpression(org.apache.derby.iapi.sql.compile.Optimizable)
public RelationalOperator getTransitiveSearchClause(ColumnReference otherCR)
throws StandardException
RelationalOperator
getTransitiveSearchClause in interface RelationalOperatorotherCR - 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 UnaryOperatorNodepublic double selectivity(Optimizable optTable)
selectivity in class ValueNodeprivate boolean isNullNode()
private boolean isNotNullNode()
public boolean isRelationalOperator()
ValueNode
isRelationalOperator in class ValueNodeValueNode.isRelationalOperator()
public boolean optimizableEqualityNode(Optimizable optTable,
int columnNumber,
boolean isNullOkay)
ValueNode
optimizableEqualityNode in class ValueNodeoptTable - 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)
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||