public final class IsNullNode extends UnaryComparisonOperatorNode implements RelationalOperator
| Modifier and Type | Field and Description |
|---|---|
private DataValueDescriptor |
nullValue |
methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes, XMLPARSE_OP, XMLSERIALIZE_OPtransformedAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEXEQUALS_RELOP, GREATER_EQUALS_RELOP, GREATER_THAN_RELOP, IS_NOT_NULL_RELOP, IS_NULL_RELOP, LESS_EQUALS_RELOP, LESS_THAN_RELOP, NOT_EQUALS_RELOP| Constructor and Description |
|---|
IsNullNode() |
| Modifier and Type | Method and Description |
|---|---|
(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.
|
bindComparisonOperator, bindExpression, eliminateNots, generateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparisonacceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, generateExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, init, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toStringpushSqlXmlUtilbindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, evaluateConstantExpressions, genEqualsFalseTree, generate, generateFilter, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isSameNodeType, putAndsOnTop, requiresTypeFromContext, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTopaccept, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExistclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgenerateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparisonprivate DataValueDescriptor nullValue
public void setNodeType(int nodeType)
QueryTreeNodesetNodeType in class QueryTreeNodenodeType - The node type.UnaryOperatorNode getNegation(ValueNode operand) throws StandardException
getNegation in class UnaryComparisonOperatorNodeoperand - The operand of the operatorStandardException - Thrown on errorvoid bindParameter()
throws StandardException
bindParameter in class UnaryOperatorNodeStandardException - Thrown on errorpublic boolean usefulStartKey(Optimizable optTable)
RelationalOperatorusefulStartKey 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)
RelationalOperatorusefulStopKey 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)
RelationalOperatorgetStartOperator 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)
RelationalOperatorgetStopOperator 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)
RelationalOperatorgenerateOperator 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)
RelationalOperatorgenerateNegate 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()
RelationalOperatorgetOperator in interface RelationalOperatorRelationalOperator.getOperator()public boolean compareWithKnownConstant(Optimizable optTable, boolean considerParameters)
RelationalOperatorcompareWithKnownConstant in interface RelationalOperatorRelationalOperator.compareWithKnownConstant(org.apache.derby.iapi.sql.compile.Optimizable, boolean)public DataValueDescriptor getCompareValue(Optimizable optTable) throws StandardException
RelationalOperatorgetCompareValue in interface RelationalOperatorStandardException - Thrown on errorRelationalOperator.getCompareValue(org.apache.derby.iapi.sql.compile.Optimizable)public boolean equalsComparisonWithConstantExpression(Optimizable optTable)
RelationalOperatorpublic RelationalOperator getTransitiveSearchClause(ColumnReference otherCR) throws StandardException
RelationalOperatorgetTransitiveSearchClause 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()
ValueNodeisRelationalOperator in class ValueNodeValueNode.isRelationalOperator()public boolean optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay)
ValueNodeoptimizableEqualityNode 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)Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.