|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ResultSetNode
org.apache.derby.impl.sql.compile.FromTable
abstract class FromTable
A FromTable represents a table in the FROM clause of a DML statement. It can be either a base table, a subquery or a project restrict.
FromBaseTable,
FromSubquery,
ProjectRestrictNode| Field Summary | |
|---|---|
protected static short |
ADD_PLAN
|
(package private) AccessPathImpl |
bestAccessPath
|
protected CostEstimate |
bestCostEstimate
|
private java.util.HashMap |
bestPlanMap
Set of object->trulyTheBestAccessPath mappings used to keep track of which of this Optimizable's "trulyTheBestAccessPath" was the best with respect to a specific outer query or ancestor node. |
(package private) AccessPathImpl |
bestSortAvoidancePath
|
private boolean |
considerSortAvoidancePath
|
(package private) java.lang.String |
correlationName
|
(package private) TableName |
corrTableName
|
(package private) AccessPathImpl |
currentAccessPath
|
(package private) int[] |
hashKeyColumns
|
(package private) int |
initialCapacity
|
private int |
joinStrategyNumber
|
(package private) int |
level
|
protected static short |
LOAD_PLAN
|
(package private) float |
loadFactor
|
(package private) int |
maxCapacity
|
protected TableName |
origTableName
the original unbound table name |
private double |
perRowUsage
|
protected static short |
REMOVE_PLAN
Operations that can be performed on bestPlanMap. |
(package private) int |
tableNumber
|
(package private) java.util.Properties |
tableProperties
|
(package private) AccessPathImpl |
trulyTheBestAccessPath
|
protected java.lang.String |
userSpecifiedJoinStrategy
|
| Fields inherited from class org.apache.derby.impl.sql.compile.ResultSetNode |
|---|
costEstimate, cursorTargetTable, finalCostEstimate, insertSource, optimizer, referencedTableMap, resultColumns, resultSetNumber, scratchCostEstimate, statementResultSet |
| Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode |
|---|
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired |
| Constructor Summary | |
|---|---|
FromTable()
|
|
| Method Summary | |
|---|---|
protected void |
assignCostEstimate(CostEstimate newCostEstimate)
Assign the cost estimate in this node to the given cost estimate. |
protected boolean |
canBeOrdered()
Most Optimizables cannot be ordered |
boolean |
considerSortAvoidancePath()
Check whether this optimizable's sort avoidance path should be considered. |
int |
convertAbsoluteToRelativeColumnPosition(int absolutePosition)
Convert an absolute to a relative 0-based column position. |
protected boolean |
cursorTargetTable()
Is this a table that has a FOR UPDATE clause. |
(package private) void |
decrementLevel(int decrement)
Decrement (query block) level (0-based) for this FromTable. |
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. |
boolean |
feasibleJoinStrategy(OptimizablePredicateList predList,
Optimizer optimizer)
Is the current proposed join strategy for this optimizable feasible given the predicate list? |
void |
fillInReferencedTableMap(JBitSet passedMap)
Fill the referencedTableMap with this ResultSetNode. |
FromList |
flatten(ResultColumnList rcl,
PredicateList outerPList,
SubqueryList sql,
GroupByList gbl,
ValueNode havingClause)
Flatten this FromTable into the outer query block. |
boolean |
forUpdate()
Return true if this is the target table of an update |
java.lang.String |
getBaseTableName()
Get the table name of this Optimizable. |
AccessPath |
getBestAccessPath()
Get the best access path for this Optimizable. |
AccessPath |
getBestSortAvoidancePath()
Get the best sort-avoidance path for this Optimizable. |
java.lang.String |
getCorrelationName()
Get this table's correlation name, if any. |
protected CostEstimate |
getCostEstimate(Optimizer optimizer)
|
AccessPath |
getCurrentAccessPath()
Get the current access path under consideration for this Optimizable |
java.lang.String |
getExposedName()
Get the exposed name for this table, which is the name that can be used to refer to it in the rest of the query. |
CostEstimate |
getFinalCostEstimate()
Get the final CostEstimate for this FromTable. |
protected FromTable |
getFromTableByName(java.lang.String name,
java.lang.String schemaName,
boolean exactMatch)
Determine whether or not the specified name is an exposed name in the current query block. |
int |
getLevel()
Get the (query block) level (0-based) for this FromTable. |
java.lang.String |
getName()
Get the (exposed) name of this Optimizable |
int |
getNumColumnsReturned()
Get the number of the number of columns returned by this Optimizable. |
TableName |
getOrigTableName()
Gets the original or unbound table name for this FromTable. |
private double |
getPerRowUsage()
|
java.util.Properties |
getProperties()
Get the Properties list, if any, associated with this optimizable. |
ResultColumnList |
getResultColumnsForList(TableName allTableName,
ResultColumnList inputRcl,
TableName tableName)
Return a ResultColumnList with all of the columns in this table. |
SchemaDescriptor |
getSchemaDescriptor()
Get a schema descriptor for the given table. |
SchemaDescriptor |
getSchemaDescriptor(TableName tableName)
Get a schema descriptor for the given table. |
protected CostEstimate |
getScratchCostEstimate(Optimizer optimizer)
|
TableDescriptor |
getTableDescriptor()
Get the table descriptor for this table (if any). |
TableName |
getTableName()
Return a TableName node representing this FromTable. |
int |
getTableNumber()
Get this Optimizable's table number |
AccessPath |
getTrulyTheBestAccessPath()
Get the best access path overall for this Optimizable. |
(package private) java.lang.String |
getUserSpecifiedJoinStrategy()
Return the user specified join strategy, if any for this table. |
int[] |
hashKeyColumns()
Return the hash key column numbers, for hash join strategy |
boolean |
hasLargeObjectColumns()
Check if any columns containing large objects (BLOBs or CLOBs) are referenced in this table. |
boolean |
hasTableNumber()
Return true if this Optimizable has a table number |
void |
init(java.lang.Object correlationName,
java.lang.Object tableProperties)
Initializer for a table in a FROM list. |
void |
initAccessPaths(Optimizer optimizer)
Init the access paths for this optimizable. |
int |
initialCapacity()
Return the initial capacity of the hash table, for hash join strategy |
boolean |
isBaseTable()
Tell whether this Optimizable represents a base table |
boolean |
isCoveringIndex(ConglomerateDescriptor cd)
Return whether or not this is a covering index. |
boolean |
isFlattenableJoinNode()
Is this FromTable a JoinNode which can be flattened into the parents FromList. |
void |
isJoinColumnForRightOuterJoin(ResultColumn rc)
No-op in FromTable. |
boolean |
isMaterializable()
Tell whether this Optimizable is materializable |
boolean |
isOneRowScan()
Will the optimizable return at most 1 row per scan? |
boolean |
isTargetTable()
Is the optimizable the target table of an update or delete? |
boolean |
legalJoinOrder(JBitSet assignedTableMap)
Can this Optimizable appear at the current location in the join order. |
float |
loadFactor()
Return the load factor of the hash table, for hash join strategy |
boolean |
LOJ_reorderable(int numTables)
no LOJ reordering for this FromTable. |
protected void |
markUpdatableByCursor(java.util.List updateColumns)
Mark as updatable all the columns in the result column list of this FromBaseTable that match the columns in the given update column list. |
int |
maxCapacity(JoinStrategy joinStrategy,
int maxMemoryPerTable)
Return the maximum capacity of the hash table, for hash join strategy |
boolean |
memoryUsageOK(double rowCount,
int maxMemoryPerTable)
|
Optimizable |
modifyAccessPath(JBitSet outerTables)
Modify the access path for this Optimizable, as necessary. |
boolean |
needsSpecialRCLBinding()
|
boolean |
nextAccessPath(Optimizer optimizer,
OptimizablePredicateList predList,
RowOrdering rowOrdering)
Choose the next access path to evaluate for this Optimizable. |
CostEstimate |
optimizeIt(Optimizer optimizer,
OptimizablePredicateList predList,
CostEstimate outerCost,
RowOrdering rowOrdering)
Choose the best access path for this Optimizable. |
(package private) void |
optimizeSubqueries(DataDictionary dd,
double rowCount)
Optimize any subqueries that haven't been optimized any where else. |
void |
pullOptPredicates(OptimizablePredicateList optimizablePredicates)
Pull all the OptimizablePredicates from this Optimizable and put them in the given OptimizablePredicateList. |
(package private) void |
pushExpressions(PredicateList predicateList)
Push expressions down to the first ResultSetNode which can do expression evaluation and has the same referenced table map. |
boolean |
pushOptPredicate(OptimizablePredicate optimizablePredicate)
Push an OptimizablePredicate down, if this node accepts it. |
void |
rememberAsBest(int planType,
Optimizer optimizer)
Remember the current access path as the best one (so far). |
void |
rememberJoinStrategyAsBest(AccessPath ap)
Remember the current join strategy as the best one so far in this join order. |
void |
rememberSortAvoidancePath()
Mark this optimizable so that its sort avoidance path will be considered. |
protected void |
resetJoinStrategies(Optimizer optimizer)
This method is called when this table is placed in a potential join order, or when a new conglomerate is being considered. |
protected void |
setCostEstimate(CostEstimate newCostEstimate)
Set the cost estimate in this node to the given cost estimate. |
void |
setHashKeyColumns(int[] columnNumbers)
Set the hash key column numbers, for hash join strategy |
void |
setLevel(int level)
Set the (query block) level (0-based) for this FromTable. |
void |
setOrigTableName(TableName tableName)
Sets the original or unbound table name for this FromTable. |
void |
setProperties(java.util.Properties tableProperties)
Set the Properties list for this optimizalbe. |
void |
setTableNumber(int tableNumber)
Set the table # for this table. |
void |
startOptimizing(Optimizer optimizer,
RowOrdering rowOrdering)
Begin the optimization process for this Optimizable. |
boolean |
supportsMultipleInstantiations()
Tell whether this Optimizable can be instantiated multiple times |
protected void |
tellRowOrderingAboutConstantColumns(RowOrdering rowOrdering,
OptimizablePredicateList predList)
Tell the given RowOrdering about any columns that are constant due to their being equality comparisons with constant expressions. |
java.lang.String |
toString()
Convert this object to a String. |
FromTable |
transformOuterJoins(ValueNode predicateTree,
int numTables)
Transform any Outer Join into an Inner Join where applicable. |
double |
uniqueJoin(OptimizablePredicateList predList)
Does this optimizable have a uniqueness condition on the given predicate list, and if so, how many unique keys will be returned per scan. |
void |
updateBestPlanMap(short action,
java.lang.Object planKey)
When remembering "truly the best" access path for an Optimizable, we have to keep track of which OptimizerImpl the "truly the best" access is for. |
void |
verifyProperties(DataDictionary dDictionary)
Verify that the Properties list with optimizer overrides, if specified, is valid |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.derby.iapi.sql.compile.Optimizable |
|---|
getDataDictionary, getReferencedTableMap, getResultSetNumber |
| Field Detail |
|---|
java.util.Properties tableProperties
java.lang.String correlationName
TableName corrTableName
int tableNumber
int level
int[] hashKeyColumns
int initialCapacity
float loadFactor
int maxCapacity
AccessPathImpl currentAccessPath
AccessPathImpl bestAccessPath
AccessPathImpl bestSortAvoidancePath
AccessPathImpl trulyTheBestAccessPath
private int joinStrategyNumber
protected java.lang.String userSpecifiedJoinStrategy
protected CostEstimate bestCostEstimate
private double perRowUsage
private boolean considerSortAvoidancePath
private java.util.HashMap bestPlanMap
protected static final short REMOVE_PLAN
protected static final short ADD_PLAN
protected static final short LOAD_PLAN
protected TableName origTableName
| Constructor Detail |
|---|
FromTable()
| Method Detail |
|---|
public void init(java.lang.Object correlationName,
java.lang.Object tableProperties)
init in interface Nodeinit in class QueryTreeNodecorrelationName - The correlation nametableProperties - Properties list associated with the tablepublic java.lang.String getCorrelationName()
public CostEstimate optimizeIt(Optimizer optimizer,
OptimizablePredicateList predList,
CostEstimate outerCost,
RowOrdering rowOrdering)
throws StandardException
Optimizable
optimizeIt in interface Optimizableoptimizer - Optimizer to use.predList - The predicate list to optimize againstouterCost - The CostEstimate for the outer tables in the join order,
telling how many times this Optimizable will be scanned.rowOrdering - The row ordering for all the tables in the
join order, including this one.
StandardException - Thrown on errorOptimizable.optimizeIt(org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.compile.CostEstimate, org.apache.derby.iapi.sql.compile.RowOrdering)
public boolean nextAccessPath(Optimizer optimizer,
OptimizablePredicateList predList,
RowOrdering rowOrdering)
throws StandardException
Optimizable
nextAccessPath in interface Optimizableoptimizer - Optimizer to use.predList - The predicate list for this optimizable.
The optimizer always passes null, and it is up
to the optimizable object to pass along its
own predicate list, if appropriate, when delegating
this method.rowOrdering - The row ordering for all the outer tables in
the join order. This method will add the ordering
of the next access path to the given RowOrdering.
StandardException - Thrown on errorOptimizable.nextAccessPath(org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.compile.RowOrdering)protected boolean canBeOrdered()
public AccessPath getCurrentAccessPath()
Optimizable
getCurrentAccessPath in interface OptimizableOptimizable.getCurrentAccessPath()public AccessPath getBestAccessPath()
Optimizable
getBestAccessPath in interface OptimizableOptimizable.getBestAccessPath()public AccessPath getBestSortAvoidancePath()
Optimizable
getBestSortAvoidancePath in interface OptimizableOptimizable.getBestSortAvoidancePath()public AccessPath getTrulyTheBestAccessPath()
Optimizable
getTrulyTheBestAccessPath in interface OptimizableOptimizable.getTrulyTheBestAccessPath()public void rememberSortAvoidancePath()
Optimizable
rememberSortAvoidancePath in interface OptimizableOptimizable.rememberSortAvoidancePath()public boolean considerSortAvoidancePath()
Optimizable
considerSortAvoidancePath in interface OptimizableOptimizable.considerSortAvoidancePath()public void rememberJoinStrategyAsBest(AccessPath ap)
Optimizable
rememberJoinStrategyAsBest in interface OptimizableOptimizable.rememberJoinStrategyAsBest(org.apache.derby.iapi.sql.compile.AccessPath)public TableDescriptor getTableDescriptor()
Optimizable
getTableDescriptor in interface OptimizableOptimizable.getTableDescriptor()
public boolean pushOptPredicate(OptimizablePredicate optimizablePredicate)
throws StandardException
Optimizable
pushOptPredicate in interface OptimizableoptimizablePredicate - OptimizablePredicate to push down.
StandardException - Thrown on errorOptimizable.pushOptPredicate(org.apache.derby.iapi.sql.compile.OptimizablePredicate)
public void pullOptPredicates(OptimizablePredicateList optimizablePredicates)
throws StandardException
Optimizable
pullOptPredicates in interface OptimizableoptimizablePredicates - The list to put the pulled predicates
in.
StandardException - Thrown on errorOptimizable.pullOptPredicates(org.apache.derby.iapi.sql.compile.OptimizablePredicateList)
public Optimizable modifyAccessPath(JBitSet outerTables)
throws StandardException
Optimizable
modifyAccessPath in interface OptimizableouterTables - 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)
public boolean isCoveringIndex(ConglomerateDescriptor cd)
throws StandardException
Optimizable
isCoveringIndex in interface Optimizablecd - ConglomerateDesriptor for index to consider
StandardException - Thrown on errorOptimizable.isCoveringIndex(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor)public java.util.Properties getProperties()
Optimizable
getProperties in interface OptimizableOptimizable.getProperties()public void setProperties(java.util.Properties tableProperties)
Optimizable
setProperties in interface OptimizabletableProperties - The Properties list for this optimizable.Optimizable.setProperties(java.util.Properties)
public void verifyProperties(DataDictionary dDictionary)
throws StandardException
Optimizable
verifyProperties in interface OptimizabledDictionary - The DataDictionary to use.
StandardException - Thrown on errorOptimizable.verifyProperties(org.apache.derby.iapi.sql.dictionary.DataDictionary)
public java.lang.String getName()
throws StandardException
Optimizable
getName in interface OptimizableStandardException - Thrown on errorOptimizable.getName()public java.lang.String getBaseTableName()
Optimizable
getBaseTableName in interface OptimizableOptimizable.getBaseTableName()public int convertAbsoluteToRelativeColumnPosition(int absolutePosition)
Optimizable
convertAbsoluteToRelativeColumnPosition in interface OptimizableabsolutePosition - The absolute 0-based column position for the column.
Optimizable.convertAbsoluteToRelativeColumnPosition(int)
public void updateBestPlanMap(short action,
java.lang.Object planKey)
throws StandardException
Optimizable
updateBestPlanMap in interface Optimizableaction - Indicates whether we're adding, loading, or removing
a best plan for the OptimizerImpl/Optimizable.planKey - Object to use as the map key when adding/looking up
a plan. If it is an instance of OptimizerImpl then it corresponds
to an outer query; otherwise it's some Optimizable above this
Optimizable that could potentially reject plans chosen by the
OptimizerImpl to which this Optimizable belongs.
StandardExceptionOptimizable.updateBestPlanMap(short, java.lang.Object)
public void rememberAsBest(int planType,
Optimizer optimizer)
throws StandardException
Optimizable
rememberAsBest in interface OptimizableplanType - The type of plan (one of Optimizer.NORMAL_PLAN
or Optimizer.SORT_AVOIDANCE_PLAN)optimizer - The OptimizerImpl that is telling this Optimizable
to remember its current path as "truly the best".
StandardException - thrown on error.Optimizable.rememberAsBest(int, org.apache.derby.iapi.sql.compile.Optimizer)
public void startOptimizing(Optimizer optimizer,
RowOrdering rowOrdering)
Optimizable
startOptimizing in interface OptimizableOptimizable.startOptimizing(org.apache.derby.iapi.sql.compile.Optimizer, org.apache.derby.iapi.sql.compile.RowOrdering)protected void resetJoinStrategies(Optimizer optimizer)
public CostEstimate estimateCost(OptimizablePredicateList predList,
ConglomerateDescriptor cd,
CostEstimate outerCost,
Optimizer optimizer,
RowOrdering rowOrdering)
throws StandardException
Optimizable
estimateCost in interface OptimizablepredList - 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 CostEstimate getFinalCostEstimate()
throws StandardException
getFinalCostEstimate in class ResultSetNodeStandardExceptionpublic boolean isBaseTable()
Optimizable
isBaseTable in interface OptimizableOptimizable.isBaseTable()public boolean hasLargeObjectColumns()
hasLargeObjectColumns in interface Optimizabletrue if at least one large object column is referenced,
false otherwise
public boolean isMaterializable()
throws StandardException
Optimizable
isMaterializable in interface OptimizableStandardException - Thrown on errorOptimizable.isMaterializable()public boolean supportsMultipleInstantiations()
Optimizable
supportsMultipleInstantiations in interface OptimizableOptimizable.supportsMultipleInstantiations()public int getTableNumber()
Optimizable
getTableNumber in interface OptimizableOptimizable.getTableNumber()public boolean hasTableNumber()
Optimizable
hasTableNumber in interface OptimizableOptimizable.hasTableNumber()public boolean forUpdate()
Optimizable
forUpdate in interface OptimizableOptimizable.forUpdate()public int initialCapacity()
Optimizable
initialCapacity in interface OptimizableOptimizable.initialCapacity()public float loadFactor()
Optimizable
loadFactor in interface OptimizableOptimizable.loadFactor()
public int maxCapacity(JoinStrategy joinStrategy,
int maxMemoryPerTable)
throws StandardException
Optimizable
maxCapacity in interface OptimizablemaxMemoryPerTable - The maximum number of bytes to be used. Ignored if the user has set a maximum
number of rows for the Optimizable.
StandardException - Standard error policyOptimizable.maxCapacity(org.apache.derby.iapi.sql.compile.JoinStrategy, int)
private double getPerRowUsage()
throws StandardException
StandardExceptionpublic int[] hashKeyColumns()
Optimizable
hashKeyColumns in interface OptimizableOptimizable.hashKeyColumns()public void setHashKeyColumns(int[] columnNumbers)
Optimizable
setHashKeyColumns in interface OptimizableOptimizable.setHashKeyColumns(int[])
public boolean feasibleJoinStrategy(OptimizablePredicateList predList,
Optimizer optimizer)
throws StandardException
Optimizable
feasibleJoinStrategy in interface OptimizablepredList - The predicate list that has been pushed down to
this optimizableoptimizer - The optimizer to use.
StandardException - Thrown on errorOptimizable.feasibleJoinStrategy(org.apache.derby.iapi.sql.compile.OptimizablePredicateList, org.apache.derby.iapi.sql.compile.Optimizer)
public boolean memoryUsageOK(double rowCount,
int maxMemoryPerTable)
throws StandardException
memoryUsageOK in interface OptimizableStandardException - standard error policyOptimizable.memoryUsageOK(double, int)public void isJoinColumnForRightOuterJoin(ResultColumn rc)
HalfOuterJoinNode.isJoinColumnForRightOuterJoin(org.apache.derby.impl.sql.compile.ResultColumn)public boolean legalJoinOrder(JBitSet assignedTableMap)
Optimizable
legalJoinOrder in interface OptimizableassignedTableMap - The tables that have been placed so far in the join order.
Optimizable.legalJoinOrder(org.apache.derby.iapi.util.JBitSet)public int getNumColumnsReturned()
Optimizable
getNumColumnsReturned in interface OptimizableOptimizable.getNumColumnsReturned()public boolean isTargetTable()
Optimizable
isTargetTable in interface OptimizableOptimizable.isTargetTable()
public boolean isOneRowScan()
throws StandardException
Optimizable
isOneRowScan in interface OptimizableStandardException - Thrown on errorOptimizable.isOneRowScan()public void initAccessPaths(Optimizer optimizer)
Optimizable
initAccessPaths in interface Optimizableoptimizer - The optimizer being used.Optimizable.initAccessPaths(org.apache.derby.iapi.sql.compile.Optimizer)
public double uniqueJoin(OptimizablePredicateList predList)
throws StandardException
Optimizable
uniqueJoin in interface OptimizablepredList - The predicate list to check
StandardException - Thrown on errorOptimizable.uniqueJoin(org.apache.derby.iapi.sql.compile.OptimizablePredicateList)java.lang.String getUserSpecifiedJoinStrategy()
protected boolean cursorTargetTable()
protected CostEstimate getCostEstimate(Optimizer optimizer)
protected CostEstimate getScratchCostEstimate(Optimizer optimizer)
protected void setCostEstimate(CostEstimate newCostEstimate)
protected void assignCostEstimate(CostEstimate newCostEstimate)
public java.lang.String toString()
toString in class ResultSetNode
public ResultColumnList getResultColumnsForList(TableName allTableName,
ResultColumnList inputRcl,
TableName tableName)
throws StandardException
allTableName - The qualifier on the "*"
StandardException - Thrown on error
void pushExpressions(PredicateList predicateList)
throws StandardException
predicateList - The PredicateList.
StandardException - Thrown on error
public java.lang.String getExposedName()
throws StandardException
StandardException - Thrown on errorpublic void setTableNumber(int tableNumber)
tableNumber - The table # for this table.
public TableName getTableName()
throws StandardException
StandardException - Thrown on errorpublic void setLevel(int level)
level - The query block level for this FromTable.public int getLevel()
void decrementLevel(int decrement)
decrementLevel in class ResultSetNodedecrement - The amount to decrement by.
public SchemaDescriptor getSchemaDescriptor()
throws StandardException
StandardException - throws on schema name
that doesn't exist
public SchemaDescriptor getSchemaDescriptor(TableName tableName)
throws StandardException
tableName - the table name
StandardException - throws on schema name
that doesn't exist
protected FromTable getFromTableByName(java.lang.String name,
java.lang.String schemaName,
boolean exactMatch)
throws StandardException
getFromTableByName in class ResultSetNodename - The specified name to search for as an exposed name.schemaName - Schema name, if non-null.exactMatch - Whether or not we need an exact match on specified schema and table
names or match on table id.
StandardException - Thrown on errorpublic boolean isFlattenableJoinNode()
public boolean LOJ_reorderable(int numTables)
throws StandardException
StandardException
public FromTable transformOuterJoins(ValueNode predicateTree,
int numTables)
throws StandardException
predicateTree - The predicate tree for the query block
StandardException - Thrown on errorpublic void fillInReferencedTableMap(JBitSet passedMap)
fillInReferencedTableMap in class ResultSetNodepassedMap - The table map to fill in.protected void markUpdatableByCursor(java.util.List updateColumns)
updateColumns - A Vector representing the columns
that can be updated.
public FromList flatten(ResultColumnList rcl,
PredicateList outerPList,
SubqueryList sql,
GroupByList gbl,
ValueNode havingClause)
throws StandardException
rcl - The RCL from the outer queryouterPList - PredicateList to append wherePredicates to.sql - The SubqueryList from the outer querygbl - The group by list, if anyhavingClause - The HAVING clause, if any
StandardException - Thrown on error
void optimizeSubqueries(DataDictionary dd,
double rowCount)
throws StandardException
StandardException - Thrown on error
protected void tellRowOrderingAboutConstantColumns(RowOrdering rowOrdering,
OptimizablePredicateList predList)
public boolean needsSpecialRCLBinding()
public void setOrigTableName(TableName tableName)
tableName - the unbound table namepublic TableName getOrigTableName()
|
Built on Wed 2013-06-12 15:21:56+0000, from revision ??? | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||