Optimizable, Visitablepublic class IntersectOrExceptNode extends SetOperatorNode
ResultSetNode.QueryExpressionClauses| Modifier and Type | Field | Description |
|---|---|---|
private boolean |
addNewNodesCalled |
|
static int |
EXCEPT_OP |
|
private int[] |
intermediateOrderByColumns |
|
private int[] |
intermediateOrderByDirection |
|
private boolean[] |
intermediateOrderByNullsLow |
|
static int |
INTERSECT_OP |
|
private int |
opType |
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategyAUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEXall, qecleftOptimizer, leftResultSet, rightOptimizer, rightResultSet| Constructor | Description |
|---|---|
IntersectOrExceptNode(int opType,
ResultSetNode leftResult,
ResultSetNode rightResult,
boolean all,
java.util.Properties tableProperties,
ContextManager cm) |
Constructor for a SetOperatorNode.
|
| Modifier and Type | Method | Description |
|---|---|---|
private ResultSetNode |
addNewNodes() |
Add any new ResultSetNodes that are necessary to the tree.
|
CostEstimate |
estimateCost(OptimizablePredicateList predList,
ConglomerateDescriptor cd,
CostEstimate outerCost,
Optimizer optimizer,
RowOrdering rowOrdering) |
Estimate the cost of scanning this Optimizable using the given
predicate list with the given conglomerate.
|
(package private) void |
generate(ActivationClassBuilder acb,
MethodBuilder mb) |
Generate the code.
|
(package private) CostEstimate |
getFinalCostEstimate() |
Get the final CostEstimate for this FromTable.
|
(package private) java.lang.String |
getOperatorName() |
|
private int |
getOpType() |
|
(package private) double |
getRowCountEstimate(double leftRowCount,
double rightRowCount) |
|
(package private) double |
getSingleScanRowCountEstimate(double leftSingleScanRowCount,
double rightSingleScanRowCount) |
|
Optimizable |
modifyAccessPath(JBitSet outerTables) |
Modify the access path for this Optimizable, as necessary.
|
(package private) ResultSetNode |
modifyAccessPaths() |
Modify the access paths according to the decisions the optimizer
made.
|
(package private) ResultSetNode |
preprocess(int numTables,
GroupByList gbl,
FromList fromList) |
Push order by lists down to the children so that we can implement the intersect/except
by scan of the two sorted inputs.
|
private void |
pushOrderingDown(ResultSetNode rsn) |
assignCostEstimate, canBeOrdered, columnsAreUpdatable, considerSortAvoidancePath, convertAbsoluteToRelativeColumnPosition, cursorTargetTable, feasibleJoinStrategy, fillInReferencedTableMap, flatten, forUpdate, getBaseTableName, getBestAccessPath, getBestSortAvoidancePath, getCorrelationName, getCostEstimate, getCurrentAccessPath, getLevel, getMergeTableID, getName, getNumColumnsReturned, getOrigTableName, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableDescriptor, getTableName, getTableNumber, getTrulyTheBestAccessPath, getUserSpecifiedJoinStrategy, hashKeyColumns, hasLargeObjectColumns, hasTableNumber, initAccessPaths, initialCapacity, isBaseTable, isCoveringIndex, isFlattenableJoinNode, isJoinColumnForRightOuterJoin, isMaterializable, isOneRowScan, isTargetTable, legalJoinOrder, loadFactor, LOJ_reorderable, markUpdatableByCursor, maxCapacity, memoryUsageOK, nextAccessPath, optimizeIt, optimizeSubqueries, pushExpressions, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setCostEstimateCost, setHashKeyColumns, setMergeTableID, setOrigTableName, setProperties, setTableNumber, startOptimizing, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, transformOuterJoins, uniqueJoinclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataDictionary, getOptimizerTracer, getReferencedTableMap, getResultSetNumber, optimizerTracingIsOnaccept, 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, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExistaddNewPredicate, assignResultSetNumber, changeAccessPath, columnTypesAndLengthsMatch, considerMaterialization, enhanceRCLForInsert, generateNormalizationResultSet, generateResultSet, genProjectRestrict, genProjectRestrict, genProjectRestrictForReordering, getAllResultColumns, getCandidateFinalCostEstimate, getCostEstimate, getCursorTargetTable, getFromList, getMatchingColumn, getNewCostEstimate, getOptimizer, getOptimizerImpl, getRCLForInsert, getReferencedTableMap, getResultColumns, getResultSetNumber, getScratchCostEstimate, isCursorTargetTable, isInsertSource, isNotExists, isOneRowResultSet, isOrderedOn, isPossibleDistinctScan, isStatementResultSet, isUpdatableCursor, LOJgetReferencedTables, makeResultDescription, makeResultDescriptors, markAsCursorTargetTable, markForDistinctScan, markStatementResultSet, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, parseDefault, printQueryExpressionSuffixClauses, rejectXMLValues, renameGeneratedResultNames, returnsAtMostOneRow, setCandidateFinalCostEstimate, setCostEstimate, setCursorTargetTable, setInsertSource, setOptimizer, setReferencedTableMap, setResultColumns, setResultSetNumber, setScratchCostEstimate, setTableConstructorTypes, subqueryReferencesTarget, updateTargetLockModebindExpressions, bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, ensurePredicateList, flattenableInFromSubquery, getFromTableByName, getLeftOptPredicateList, getParamColumnTypes, getRightOptPredicateList, hasUnPushedPredicates, modifyAccessPath, performMaterialization, printSubNodes, pullOptPredicates, pushOffsetFetchFirst, pushOptPredicate, pushOrderByList, pushQueryExpressionSuffix, replaceOrForbidDefaults, setParamColumnTypes, setResultToBooleanTrueNode, toString, verifySelectStarSubqueryacceptChildren, adjustForSortElimination, adjustForSortElimination, bindExpressionsWithTables, bindNonVTITables, bindVTITables, decrementLevel, getExposedName, getLeftmostResultSet, getLeftResultSet, getRightResultSet, needsSpecialRCLBinding, optimize, optimizeSource, projectResultColumns, referencesSessionSchema, referencesTarget, rejectParameters, setLeftmostResultSet, setLevel, setNestedInParens, setReferencedColumns, updateBestPlanMap, verifyPropertiesaccept, addTag, taggedWithprivate int opType
public static final int INTERSECT_OP
public static final int EXCEPT_OP
private boolean addNewNodesCalled
private int[] intermediateOrderByColumns
private int[] intermediateOrderByDirection
private boolean[] intermediateOrderByNullsLow
IntersectOrExceptNode(int opType,
ResultSetNode leftResult,
ResultSetNode rightResult,
boolean all,
java.util.Properties tableProperties,
ContextManager cm)
throws StandardException
opType - The operator type: one of EXCEPT_OP or
INTERSECT_OP.leftResult - The ResultSetNode on the left side of this unionrightResult - The ResultSetNode on the right side of this unionall - true if this is an ALL set operation.tableProperties - Properties list associated with the tablecm - The context managerStandardException - Thrown on errorprivate int getOpType()
ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException
preprocess in class SetOperatorNodenumTables - Number of tables in the DML Statementgbl - The group by list, if anyfromList - The from list, if anyStandardException - Thrown on errorprivate void pushOrderingDown(ResultSetNode rsn) throws StandardException
StandardExceptionpublic CostEstimate estimateCost(OptimizablePredicateList predList, ConglomerateDescriptor cd, CostEstimate outerCost, Optimizer optimizer, RowOrdering rowOrdering) throws StandardException
OptimizableestimateCost in interface OptimizableestimateCost in class FromTablepredList - The predicate list to optimize againstcd - The conglomerate descriptor to get the cost ofouterCost - The estimated cost of the part of the plan outer
to this optimizable.optimizer - The optimizer to use to help estimate the costrowOrdering - The row ordering for all the tables in the
join order, including this one.StandardException - Thrown on errorOptimizable.estimateCost(org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.RowOrdering)public Optimizable modifyAccessPath(JBitSet outerTables) throws StandardException
OptimizablemodifyAccessPath in interface OptimizablemodifyAccessPath in class TableOperatorNodeouterTables - Bit map of the tables that are outer to this one
in the join order.StandardException - Thrown on errorOptimizable.modifyAccessPath(org.apache.derby.iapi.util.JBitSet)ResultSetNode modifyAccessPaths() throws StandardException
ResultSetNodemodifyAccessPaths in class TableOperatorNodeStandardException - Thrown on errorResultSetNode.modifyAccessPaths()private ResultSetNode addNewNodes() throws StandardException
StandardException - Thrown on errorvoid generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException
generate in class QueryTreeNodeacb - The ActivationClassBuilder for the class being builtmb - The method for the generated code to go intoStandardException - Thrown on errorCostEstimate getFinalCostEstimate() throws StandardException
FromTablegetFinalCostEstimate in class FromTableStandardExceptionGet the final CostEstimate for this IntersectOrExceptNode.java.lang.String getOperatorName()
getOperatorName in class SetOperatorNodedouble getRowCountEstimate(double leftRowCount,
double rightRowCount)
double getSingleScanRowCountEstimate(double leftSingleScanRowCount,
double rightSingleScanRowCount)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.