Visitable
, RelationalOperator
public final class IsNullNode extends UnaryComparisonOperatorNode implements RelationalOperator
Modifier and Type | Field | Description |
---|---|---|
private boolean |
notNull |
If
true , this node represents a NOT NULL node rather than a
NULL node. |
private DataValueDescriptor |
nullValue |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
EQUALS_RELOP, GREATER_EQUALS_RELOP, GREATER_THAN_RELOP, IS_NOT_NULL_RELOP, IS_NULL_RELOP, LESS_EQUALS_RELOP, LESS_THAN_RELOP, NOT_EQUALS_RELOP
K_BASE, K_XMLPARSE, K_XMLSERIALIZE, kind, methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes
transformed
Constructor | Description |
---|---|
IsNullNode(ValueNode operand,
boolean notNull,
ContextManager cm) |
Modifier and Type | Method | 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.
|
(package private) 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.
|
(package private) boolean |
isNullNode() |
|
(package private) boolean |
isRelationalOperator() |
Returns true if this ValueNode is a relational operator.
|
(package private) boolean |
optimizableEqualityNode(Optimizable optTable,
int columnNumber,
boolean isNullOkay) |
Return true if the predicate represents an optimizable equality node.
|
double |
selectivity(Optimizable optTable) |
The default selectivity for value nodes is 50%.
|
private void |
updateOperatorDetails() |
|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
pushSqlXmlUtil
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
generateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison
bindComparisonOperator, bindExpression, eliminateNots, generateAbsoluteColumnId, generateExpressionOperand, generateOrderedNulls, generateQualMethod, generateRelativeColumnId, getColumnOperand, getColumnOperand, getExpressionOperand, getOperand, getOrderableVariantType, isQualifier, orderedNulls, selfComparison
acceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, generateExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, isConstantExpression, isEquivalent, isSameNodeKind, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toString
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, evaluateConstantExpressions, genEqualsFalseTree, generate, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, putAndsOnTop, requiresTypeFromContext, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
private DataValueDescriptor nullValue
private boolean notNull
true
, this node represents a NOT NULL node rather than a
NULL node. Note that this state is mutable, cf getNegation(org.apache.derby.impl.sql.compile.ValueNode)
.IsNullNode(ValueNode operand, boolean notNull, ContextManager cm) throws StandardException
StandardException
private void updateOperatorDetails()
UnaryOperatorNode getNegation(ValueNode operand) throws StandardException
getNegation
in class UnaryComparisonOperatorNode
operand
- The operand of the operatorStandardException
- 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
optTable
- 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 RelationalOperator
getStopOperator
in class UnaryComparisonOperatorNode
optTable
- 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 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
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)
java.lang.String getReceiverInterfaceName()
getReceiverInterfaceName
in class UnaryOperatorNode
public double selectivity(Optimizable optTable)
ValueNode
selectivity
in class ValueNode
boolean isNullNode()
boolean isRelationalOperator()
ValueNode
isRelationalOperator
in class ValueNode
ValueNode.isRelationalOperator()
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)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.