public final class InListOperatorNode extends BinaryListOperatorNode
Modifier and Type | Field and Description |
---|---|
private boolean |
isOrdered |
private boolean |
sortDescending |
leftOperand, methodName, operator, rightOperandList
transformed
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
InListOperatorNode(ValueNode leftOperand,
ValueNodeList rightOperandList,
ContextManager cm) |
Modifier and Type | Method and Description |
---|---|
(package private) ValueNode |
eliminateNots(boolean underNotNode)
Eliminate NotNodes in the current query block.
|
(package private) void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
Do code generation for this IN list operator.
|
protected LocalField |
generateListAsArray(ExpressionClassBuilder acb,
MethodBuilder mb)
Generate the code to create an array of DataValueDescriptors that
will hold the IN-list values at execution time.
|
(package private) void |
generateStartStopKey(boolean isAsc,
boolean isStartKey,
ExpressionClassBuilder acb,
MethodBuilder mb)
Generate start/stop key for this IN list operator.
|
private DataTypeDescriptor |
getDominantType()
Get the dominant type of all the operands in this IN list.
|
protected boolean |
isOrdered()
Return whether or not the IN-list values for this node are ordered.
|
protected void |
markAsOrdered()
Indicate that the IN-list values for this node are ordered (i.e. they
are all constants and they have been sorted).
|
protected void |
markSortDescending()
Indicate that the IN-list values for this node must be sorted
in DESCENDING order.
|
(package private) ValueNode |
preprocess(int numTables,
FromList outerFromList,
SubqueryList outerSubqueryList,
PredicateList outerPredicateList)
Preprocess an expression tree.
|
double |
selectivity(Optimizable optTable)
The selectivity for an "IN" predicate is generally very small.
|
(package private) boolean |
selfReference(ColumnReference cr)
See if this IN list operator is referencing the same table.
|
protected InListOperatorNode |
shallowCopy()
Create a shallow copy of this InListOperatorNode whose operands are
the same as this node's operands.
|
protected boolean |
sortDescending()
Return whether or not the IN-list values for this node must be
sorted in DESCENDING order.
|
java.lang.String |
toString()
Convert this object to a String.
|
acceptChildren, bindComparisonOperator, bindExpression, categorize, constantExpression, getLeftOperand, getOrderableVariantType, getRightOperandList, isConstantExpression, isEquivalent, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setRightOperandList
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, isRelationalOperator, isSameNodeKind, optimizableEqualityNode, putAndsOnTop, requiresTypeFromContext, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
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
InListOperatorNode(ValueNode leftOperand, ValueNodeList rightOperandList, ContextManager cm) throws StandardException
leftOperand
- The left operand of the noderightOperandList
- The right operand list of the nodecm
- Context managerStandardException
public java.lang.String toString()
toString
in class BinaryListOperatorNode
protected InListOperatorNode shallowCopy() throws StandardException
StandardException
ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess
in class BinaryListOperatorNode
numTables
- Number of tables in the DML StatementouterFromList
- FromList from outer query blockouterSubqueryList
- SubqueryList from outer query blockouterPredicateList
- PredicateList from outer query blockStandardException
- Thrown on errorprivate DataTypeDescriptor getDominantType()
DataTypeDescriptor.getDominantType(DataTypeDescriptor, ClassFactory)
ValueNode eliminateNots(boolean underNotNode) throws StandardException
eliminateNots
in class ValueNode
underNotNode
- Whether or not we are under a NotNode.StandardException
- Thrown on errorboolean selfReference(ColumnReference cr) throws StandardException
cr
- The column reference.StandardException
- Thrown on errorpublic double selectivity(Optimizable optTable)
selectivity
in class ValueNode
void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression
in class ValueNode
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go intoStandardException
- Thrown on errorprotected LocalField generateListAsArray(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go intoStandardException
void generateStartStopKey(boolean isAsc, boolean isStartKey, ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
isAsc
- is the index ascending on the column in questionisStartKey
- are we generating start key or notacb
- The ExpressionClassBuilder for the class we're generatingmb
- The MethodBuilder the expression will go intoStandardException
- Thrown on errorprotected void markAsOrdered()
protected void markSortDescending()
protected boolean isOrdered()
protected boolean sortDescending()
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.