public final class InListOperatorNode extends BinaryListOperatorNode
| Modifier and Type | Field and Description |
|---|---|
private boolean |
isOrdered |
private boolean |
sortDescending |
leftInterfaceType, leftOperand, methodName, operator, receiver, rightInterfaceType, rightOperandListtransformedAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX| Constructor and Description |
|---|
InListOperatorNode() |
| Modifier and Type | Method and Description |
|---|---|
(package private) ValueNode |
eliminateNots(boolean underNotNode)
Eliminate NotNodes in the current query block.
|
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.
|
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.
|
void |
init(java.lang.Object leftOperand,
java.lang.Object rightOperandList)
Initializer for a InListOperatorNode
|
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.
|
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.
|
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, init, isConstantExpression, isEquivalent, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setRightOperandListbindExpression, 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, isRelationalOperator, isSameNodeType, optimizableEqualityNode, 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, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExistpublic void init(java.lang.Object leftOperand,
java.lang.Object rightOperandList)
init in interface Nodeinit in class QueryTreeNodeleftOperand - The left operand of the noderightOperandList - The right operand list of the nodepublic java.lang.String toString()
toString in class BinaryListOperatorNodeprotected InListOperatorNode shallowCopy() throws StandardException
StandardExceptionpublic ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException
preprocess in class BinaryListOperatorNodenumTables - 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 ValueNodeunderNotNode - Whether or not we are under a NotNode.StandardException - Thrown on errorpublic boolean selfReference(ColumnReference cr) throws StandardException
cr - The column reference.StandardException - Thrown on errorpublic double selectivity(Optimizable optTable)
selectivity in class ValueNodepublic void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression in class ValueNodeacb - 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 intoStandardExceptionpublic 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.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.