org.apache.derby.impl.sql.compile
Class HashTableNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ResultSetNode
org.apache.derby.impl.sql.compile.FromTable
org.apache.derby.impl.sql.compile.SingleChildResultSetNode
org.apache.derby.impl.sql.compile.HashTableNode
- All Implemented Interfaces:
- Optimizable, Visitable
public class HashTableNode
- extends SingleChildResultSetNode
A HashTableNode represents a result set where a hash table is built.
Fields inherited from class org.apache.derby.impl.sql.compile.FromTable |
ADD_PLAN, bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, LOAD_PLAN, loadFactor, maxCapacity, origTableName, REMOVE_PLAN, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy |
Method Summary |
(package private) void |
acceptChildren(Visitor v)
Accept the visitor for all visitable children of this node. |
void |
generate(ActivationClassBuilder acb,
MethodBuilder mb)
For joins, the tree will be (nodes are left out if the clauses
are empty):
ProjectRestrictResultSet -- for the having and the select list
SortResultSet -- for the group by list
ProjectRestrictResultSet -- for the where and the select list (if no group or having)
the result set for the fromList |
private void |
generateMinion(ExpressionClassBuilder acb,
MethodBuilder mb,
boolean genChildResultSet)
Logic shared by generate() and generateResultSet(). |
void |
generateResultSet(ExpressionClassBuilder acb,
MethodBuilder mb)
General logic shared by Core compilation and by the Replication Filter
compiler. |
void |
init(java.lang.Object childResult,
java.lang.Object tableProperties,
java.lang.Object resultColumns,
java.lang.Object searchPredicateList,
java.lang.Object joinPredicateList,
java.lang.Object accessPath,
java.lang.Object costEstimate,
java.lang.Object pSubqueryList,
java.lang.Object rSubqueryList,
java.lang.Object hashKeyColumns)
Initializer for a HashTableNode. |
Optimizable |
modifyAccessPath(JBitSet outerTables,
Optimizer optimizer)
|
void |
printSubNodes(int depth)
Prints the sub-nodes of this object. |
Methods inherited from class org.apache.derby.impl.sql.compile.SingleChildResultSetNode |
addNewPredicate, adjustForSortElimination, adjustForSortElimination, changeAccessPath, decrementLevel, ensurePredicateList, flattenableInFromSubquery, forUpdate, getChildResult, getFinalCostEstimate, getFromTableByName, getTrulyTheBestAccessPath, init, initAccessPaths, isNotExists, isOneRowResultSet, isOrderedOn, modifyAccessPaths, optimize, preprocess, pullOptPredicates, pushExpressions, referencesSessionSchema, referencesTarget, reflectionNeededForProjection, setChildResult, setLevel, subqueryReferencesTarget, updateBestPlanMap, updateTargetLockMode |
Methods inherited from class org.apache.derby.impl.sql.compile.FromTable |
assignCostEstimate, canBeOrdered, considerSortAvoidancePath, convertAbsoluteToRelativeColumnPosition, cursorTargetTable, estimateCost, feasibleJoinStrategy, fillInReferencedTableMap, flatten, getBaseTableName, getBestAccessPath, getBestSortAvoidancePath, getCorrelationName, getCostEstimate, getCurrentAccessPath, getExposedName, getLevel, getName, getNumColumnsReturned, getOrigTableName, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableDescriptor, getTableName, getTableNumber, getUserSpecifiedJoinStrategy, hashKeyColumns, hasTableNumber, initialCapacity, isBaseTable, isCoveringIndex, isFlattenableJoinNode, isMaterializable, isOneRowScan, isTargetTable, legalJoinOrder, loadFactor, LOJ_reorderable, markUpdatableByCursor, maxCapacity, memoryUsageOK, modifyAccessPath, needsSpecialRCLBinding, nextAccessPath, optimizeIt, optimizeSubqueries, pushOptPredicate, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setCostEstimate, setHashKeyColumns, setOrigTableName, setProperties, setTableNumber, startOptimizing, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, toString, transformOuterJoins, uniqueJoin, verifyProperties |
Methods inherited from class org.apache.derby.impl.sql.compile.ResultSetNode |
assignResultSetNumber, bindExpressions, bindExpressionsWithTables, bindNonVTITables, bindResultColumns, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, bindVTITables, columnTypesAndLengthsMatch, considerMaterialization, disablePrivilegeCollection, enhanceRCLForInsert, generateNormalizationResultSet, genProjectRestrict, genProjectRestrict, genProjectRestrictForReordering, getAllResultColumns, getCostEstimate, getCursorTargetTable, getFromList, getMatchingColumn, getNewCostEstimate, getOptimizer, getOptimizerImpl, getRCLForInsert, getReferencedTableMap, getResultColumns, getResultSetNumber, isPossibleDistinctScan, isUpdatableCursor, LOJgetReferencedTables, makeResultDescription, makeResultDescriptors, markAsCursorTargetTable, markForDistinctScan, markStatementResultSet, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, parseDefault, performMaterialization, projectResultColumns, pushOffsetFetchFirst, pushOrderByList, rejectParameters, rejectXMLValues, renameGeneratedResultNames, replaceOrForbidDefaults, returnsAtMostOneRow, setInsertSource, setReferencedTableMap, setResultColumns, setResultToBooleanTrueNode, setTableConstructorTypes, verifySelectStarSubquery |
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
accept, bindOffsetFetch, bindRowMultiSet, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
searchPredicateList
PredicateList searchPredicateList
joinPredicateList
PredicateList joinPredicateList
pSubqueryList
SubqueryList pSubqueryList
rSubqueryList
SubqueryList rSubqueryList
HashTableNode
public HashTableNode()
init
public void init(java.lang.Object childResult,
java.lang.Object tableProperties,
java.lang.Object resultColumns,
java.lang.Object searchPredicateList,
java.lang.Object joinPredicateList,
java.lang.Object accessPath,
java.lang.Object costEstimate,
java.lang.Object pSubqueryList,
java.lang.Object rSubqueryList,
java.lang.Object hashKeyColumns)
- Initializer for a HashTableNode.
- Overrides:
init
in class QueryTreeNode
- Parameters:
childResult
- The child result settableProperties
- Properties list associated with the tableresultColumns
- The RCL.searchPredicateList
- Single table clausesjoinPredicateList
- Multi table clausesaccessPath
- The access pathcostEstimate
- The cost estimatepSubqueryList
- List of subqueries in RCLrSubqueryList
- List of subqueries in Predicate listshashKeyColumns
- Hash key columns
modifyAccessPath
public Optimizable modifyAccessPath(JBitSet outerTables,
Optimizer optimizer)
throws StandardException
- Throws:
StandardException
- Thrown on error- See Also:
Optimizable.modifyAccessPath(org.apache.derby.iapi.util.JBitSet)
printSubNodes
public void printSubNodes(int depth)
- Prints the sub-nodes of this object. See QueryTreeNode.java for
how tree printing is supposed to work.
- Overrides:
printSubNodes
in class SingleChildResultSetNode
- Parameters:
depth
- The depth of this node in the tree
generate
public void generate(ActivationClassBuilder acb,
MethodBuilder mb)
throws StandardException
- For joins, the tree will be (nodes are left out if the clauses
are empty):
ProjectRestrictResultSet -- for the having and the select list
SortResultSet -- for the group by list
ProjectRestrictResultSet -- for the where and the select list (if no group or having)
the result set for the fromList
- Overrides:
generate
in class QueryTreeNode
- Parameters:
acb
- The ActivationClassBuilder for the class being builtmb
- The method for the generated code to go into
- Throws:
StandardException
- Thrown on error
generateResultSet
public void generateResultSet(ExpressionClassBuilder acb,
MethodBuilder mb)
throws StandardException
- General logic shared by Core compilation and by the Replication Filter
compiler. A couple ResultSets (the ones used by PREPARE SELECT FILTER)
implement this method.
- Overrides:
generateResultSet
in class ResultSetNode
- Parameters:
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go into
- Throws:
StandardException
- Thrown on error
generateMinion
private void generateMinion(ExpressionClassBuilder acb,
MethodBuilder mb,
boolean genChildResultSet)
throws StandardException
- Logic shared by generate() and generateResultSet().
- Parameters:
acb
- The ExpressionClassBuilder for the class being builtmb
- the method the expression will go into
- Throws:
StandardException
- Thrown on error
acceptChildren
void acceptChildren(Visitor v)
throws StandardException
- Accept the visitor for all visitable children of this node.
- Overrides:
acceptChildren
in class SingleChildResultSetNode
- Parameters:
v
- the visitor
- Throws:
StandardException
- on error
Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.