Top Description Fields Constructors Methods
org.apache.derby.impl.sql.compile

pack-priv Class FromList

extends QueryTreeNodeVector<ResultSetNode>
implements OptimizableList
Class Inheritance
All Implemented Interfaces
org.apache.derby.iapi.sql.compile.OptimizableList
Imports
java.util.ArrayList, .Enumeration, .Properties, org.apache.derby.shared.common.error.StandardException, org.apache.derby.shared.common.reference.SQLState, org.apache.derby.iapi.services.context.ContextManager, org.apache.derby.iapi.sql.compile.CompilerContext, .Optimizable, .OptimizableList, .Optimizer, org.apache.derby.shared.common.sanity.SanityManager, org.apache.derby.iapi.sql.conn.Authorizer, org.apache.derby.iapi.sql.dictionary.DataDictionary, org.apache.derby.iapi.util.JBitSet, .StringUtil

A FromList represents the list of tables in a FROM clause in a DML statement. It extends QueryTreeNodeVector.

Field Summary

Modifier and TypeField and Description
pack-priv boolean
private boolean
pack-priv Properties
private boolean
pack-priv boolean
private WindowList
windows

Window definitions used for resolving window functions not containing in-line window specifications, but referring window definitions

Inherited from org.apache.derby.impl.sql.compile.QueryTreeNodeVector:
eltClass

Constructor Summary

AccessConstructor and Description
pack-priv
FromList(ContextManager
context manager
cm
)

Does not change the default for join order optimization, i.e. false.

pack-priv
FromList(boolean
true if join order optimization is to be performed
optimizeJoinOrder
,
ContextManager
context manager
cm
)

Constructor for a FromList

pack-priv
FromList(boolean
true if join order optimization is to be performed
optimizeJoinOrder
,
FromTable
initialize list with this table
fromTable
,
ContextManager
context manager
cm
)

Constructor for a FromList

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
addFromTable(FromTable
A FromTable to add to the list
fromTable
)

Add a table to the FROM list.

pack-priv ResultColumn

Returns:

ResultColumn The matching ResultColumn, or null if there is no matching column
bindColumnReference
(ColumnReference
The ColumnReference describing the column to bind
columnReference
)

Bind a column reference to one of the tables in this FromList.

pack-priv void
bindExpressions(FromList fromListParam)

Bind the expressions in this FromList.

pack-priv void
bindResultColumns(FromList
FromList to use/append to.
fromListParam
)

Bind the result columns of the ResultSetNodes in this FromList when there is no base table to bind them to.

pack-priv void
bindTables(DataDictionary dataDictionary, FromList fromListParam)

pack-priv void
bindUntypedNullsToResultColumns(ResultColumnList
The ResultColumnList with the types to bind to.
bindingRCL
)

Bind any untyped null nodes to the types in the given ResultColumnList.

private void
constructorMinion(boolean optimizeJoinOrder)

pack-priv void
decrementLevel(int
The amount to decrement by.
decrement
)

Decrement (query block) level (0-based) for all of the tables in this from list.

pack-priv ResultColumnList

Returns:

ResultColumnList representing expansion
expandAll
(TableName
The qualification on the "*" as a String.
allTableName
)

Expand a "*" into the appropriate ResultColumnList.

pack-priv void
flattenFromTables(ResultColumnList
The RCL from the outer query
rcl
,
PredicateList
The PredicateList from the outer query
predicateList
,
SubqueryList
The SubqueryList from the outer query
sql
,
GroupByList
The group by list, if any
gbl
,
ValueNode
The HAVING clause, if any
havingClause
)

Flatten all the FromTables that are flattenable.

pack-priv void
genExistsBaseTables(JBitSet
The referenced table map.
referencedTableMap
,
FromList
FromList from outer query block
outerFromList
,
boolean
Whether or not for NOT EXISTS
isNotExists
)

Mark all of the FromBaseTables in the list as EXISTS FBTs.

pack-priv FromTable

Returns:

The FromTable, if any, with the exposed name.
getFromTableByName
(String
The specified name to search for as an exposed name.
name
,
String
Schema name, if non-null.
schemaName
,
boolean
Whether or not we need an exact match on specified schema and table names or match on table id.
exactMatch
)

Determine whether or not the specified name is an exposed name in the current query block.

pack-priv FromTable

Returns:

FromTable The matching FromTable.
getFromTableByResultColumn
(ResultColumn
The ResultColumn match on.
rc
)

Get the FromTable from this list which has the specified ResultColumn in its RCL.

public Optimizable
getOptimizable(int
"index" (0 based) into the list.
index
)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.getOptimizable.

Return the nth Optimizable in the list.

pack-priv int[]
pack-priv WindowList

Returns:

list of window definitions associated with a SELECT.
getWindows
()

pack-priv boolean

Returns:

Whether or not the user specified a hash join for any of the tables in this list.
hashJoinSpecified
()

Return whether or not the user specified a hash join for any of the tables in this list.

public void
initAccessPaths(Optimizer
The optimizer being used.
optimizer
)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.initAccessPaths.

Init the access paths for these optimizables.

pack-priv void
isJoinColumnForRightOuterJoin(ResultColumn rc)

Go through the list of the tables and see if the passed ResultColumn is a join column for a right outer join with USING/NATURAL clause.

public boolean
legalJoinOrder(int numTablesInQuery)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.legalJoinOrder.

Tell whether the join order is legal.

pack-priv boolean
LOJ_reorderable(int numTables)

pack-priv void
markAsTransparent()

Indicate that this FromList is "transparent", which means that its FromTables should be bound to tables from an outer query.

public boolean
optimizeJoinOrder()

Implements org.apache.derby.iapi.sql.compile.OptimizableList.optimizeJoinOrder.

Tell whether the join order should be optimized.

pack-priv void
preprocess(int
The number of tables in the DML Statement
numTables
,
GroupByList
The group by list, if any
gbl
,
ValueNode predicateTree)

Preprocess the query tree - this currently means: o Generating a referenced table map for each ResultSetNode.

pack-priv void
pushPredicates(PredicateList
The query's PredicateList
predicateList
)

Categorize and push the predicates that are pushable.

public boolean

Returns:

true if references SESSION schema tables, else false
referencesSessionSchema
()

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.referencesSessionSchema.

Return true if the node references SESSION schema tables (temporary or permanent)

pack-priv boolean

Returns:

true if found, else false
referencesTarget
(String
Table name (String) to search for.
name
,
boolean
Whether or not name is for a base table
baseTable
)

Search to see if a query references the specifed table name.

pack-priv void
rejectParameters()

Check for (and reject) all ?

public void
reOrder(int[] joinOrder)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.reOrder.

Set the join order for this list of optimizables.

pack-priv boolean

Returns:

Whether or not query block will return at most 1 row for a subquery, no duplicates for a distinct.
returnsAtMostSingleRow
(ResultColumnList
If non-null, the RCL from the query block. If non-null for subqueries, then entry can be considered as part of an = comparison.
rcl
,
ValueNode
The WHERE clause to consider.
whereClause
,
PredicateList
The predicates that have already been pulled from the WHERE clause.
wherePredicates
,
DataDictionary
The DataDictionary to use.
dd
)

This method is used for both subquery flattening and distinct elimination based on a uniqueness condition.

pack-priv void
setLevel(int
The query block level for this table.
level
)

Set the (query block) level (0-based) for the FromTables in this FromList.

public void
setOptimizable(int
"index" (0 based) into the list.
index
,
Optimizable
New nth Optimizable.
optimizable
)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.setOptimizable.

Set the nth Optimizable to the specified Optimizable.

pack-priv void
setProperties(Properties props)

Set the Properties list for this FromList.

pack-priv void
setWindows(WindowList
list of window definitions associated with a SELECT.
windows
)

Set windows field to the supplied value.

pack-priv boolean

Returns:

true if this table is in the from list as NOT EXISTS
tableNumberIsNotExists
(int
which table to check
tableNumber
)

determine whether this table is NOT EXISTS.

pack-priv int

Returns:

The lock mode
updateTargetLockMode
()

Get the lock mode for the target of an update statement (a delete or update).

public boolean
useStatistics()

Implements org.apache.derby.iapi.sql.compile.OptimizableList.useStatistics.

user can specify that s/he doesn't want statistics to be considered when optimizing the query.

public void
verifyProperties(DataDictionary
The DataDictionary to use.
dDictionary
)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.verifyProperties.

Verify that the Properties list with optimizer overrides, if specified, is valid

Inherited from org.apache.derby.impl.sql.compile.QueryTreeNodeVector:
acceptChildrenaddElementdestructiveAppendelementAtindexOfinsertElementAtiteratornondestructiveAppendprintSubNodesremoveAllElementsremoveElementremoveElementAtsetElementAtsize

Field Detail

fixedJoinOrderback to summary
pack-priv boolean fixedJoinOrder
isTransparentback to summary
private boolean isTransparent
propertiesback to summary
pack-priv Properties properties
referencesSessionSchemaback to summary
private boolean referencesSessionSchema
useStatisticsback to summary
pack-priv boolean useStatistics
windowsback to summary
private WindowList windows

Window definitions used for resolving window functions not containing in-line window specifications, but referring window definitions

Constructor Detail

FromListback to summary
pack-priv FromList(ContextManager cm)

Does not change the default for join order optimization, i.e. false.

Parameters
cm:ContextManager

context manager

FromListback to summary
pack-priv FromList(boolean optimizeJoinOrder, ContextManager cm)

Constructor for a FromList

Parameters
optimizeJoinOrder:boolean

true if join order optimization is to be performed

cm:ContextManager

context manager

FromListback to summary
pack-priv FromList(boolean optimizeJoinOrder, FromTable fromTable, ContextManager cm) throws StandardException

Constructor for a FromList

Parameters
optimizeJoinOrder:boolean

true if join order optimization is to be performed

fromTable:FromTable

initialize list with this table

cm:ContextManager

context manager

Exceptions
StandardException:
Thrown on error

Method Detail

addFromTableback to summary
pack-priv final void addFromTable(FromTable fromTable) throws StandardException

Add a table to the FROM list.

Parameters
fromTable:FromTable

A FromTable to add to the list

Exceptions
StandardException:
Thrown on error
bindColumnReferenceback to summary
pack-priv ResultColumn bindColumnReference(ColumnReference columnReference) throws StandardException

Bind a column reference to one of the tables in this FromList. The column name must be unique within the tables in the FromList. An exception is thrown if a column name is not unique. This method fills in various fields in the column reference.

Note

Callers are responsible for ordering the FromList by nesting level, with tables at the deepest (current) nesting level first. We will try to match against all FromTables at a given nesting level. If no match is found at a nesting level, then we proceed to the next level. We stop walking the list when the nesting level changes and we have found a match.

Note

If the ColumnReference is qualified, then we will stop the search at the first nesting level where there is a match on the exposed table name. For example,

s (a, b, c), t (d, e, f)
		select * from s where exists (select * from t s where s.c = a)
 

will not find a match for s.c, which is the expected ANSI behavior.

bindTables() must have already been called on this FromList before calling this method.

Parameters
columnReference:ColumnReference

The ColumnReference describing the column to bind

Returns:ResultColumn

ResultColumn The matching ResultColumn, or null if there is no matching column

Exceptions
StandardException:
Thrown on error
bindExpressionsback to summary
pack-priv void bindExpressions(FromList fromListParam) throws StandardException

Bind the expressions in this FromList. This means binding the sub-expressions, as well as figuring out what the return type is for each expression.

Exceptions
StandardException:
Thrown on error
bindResultColumnsback to summary
pack-priv void bindResultColumns(FromList fromListParam) throws StandardException

Bind the result columns of the ResultSetNodes in this FromList when there is no base table to bind them to. This is useful for SELECT statements, where the result columns get their types from the expressions that live under them.

Parameters
fromListParam:FromList

FromList to use/append to.

Exceptions
StandardException:
Thrown on error
bindTablesback to summary
pack-priv void bindTables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException
bindUntypedNullsToResultColumnsback to summary
pack-priv void bindUntypedNullsToResultColumns(ResultColumnList bindingRCL) throws StandardException

Bind any untyped null nodes to the types in the given ResultColumnList.

Parameters
bindingRCL:ResultColumnList

The ResultColumnList with the types to bind to.

Exceptions
StandardException:
Thrown on error
constructorMinionback to summary
private void constructorMinion(boolean optimizeJoinOrder)
decrementLevelback to summary
pack-priv void decrementLevel(int decrement)

Decrement (query block) level (0-based) for all of the tables in this from list. This is useful when flattening a subquery.

Parameters
decrement:int

The amount to decrement by.

expandAllback to summary
pack-priv ResultColumnList expandAll(TableName allTableName) throws StandardException

Expand a "*" into the appropriate ResultColumnList. If the "*" is unqualified it will expand into a list of all columns in all of the base tables in the from list at the current nesting level; otherwise it will expand into a list of all of the columns in the base table that matches the qualification.

Note

Callers are responsible for ordering the FromList by nesting level, with tables at the deepest (current) nesting level first. We will expand the "*" into a list of all columns from all tables having the same nesting level as the first FromTable in this list. The check for nesting level exists because it's possible that this FromList includes FromTables from an outer query, which can happen if there is a "transparent" FromList above this one in the query tree. Ex: select j from onerow where exists (select 1 from somerow union select * from diffrow where onerow.j < diffrow.k) If "this" is the FromList for the right child of the UNION then it will contain both "diffrow" and "onerow", the latter of which was passed down via a transparent FromList (to allow binding of the WHERE clause). In that case the "*" should only expand the result columns of "diffrow"; it should not expand the result columns of "onerow" because that table is from an outer query. We can achieve this selective expansion by looking at nesting levels.

Parameters
allTableName:TableName

The qualification on the "*" as a String.

Returns:ResultColumnList

ResultColumnList representing expansion

Exceptions
StandardException:
Thrown on error
flattenFromTablesback to summary
pack-priv void flattenFromTables(ResultColumnList rcl, PredicateList predicateList, SubqueryList sql, GroupByList gbl, ValueNode havingClause) throws StandardException

Flatten all the FromTables that are flattenable. RESOLVE - right now we just flatten FromSubqueries. We should also flatten flattenable JoinNodes here.

Parameters
rcl:ResultColumnList

The RCL from the outer query

predicateList:PredicateList

The PredicateList from the outer query

sql:SubqueryList

The SubqueryList from the outer query

gbl:GroupByList

The group by list, if any

havingClause:ValueNode

The HAVING clause, if any

Exceptions
StandardException:
Thrown on error
genExistsBaseTablesback to summary
pack-priv void genExistsBaseTables(JBitSet referencedTableMap, FromList outerFromList, boolean isNotExists) throws StandardException

Mark all of the FromBaseTables in the list as EXISTS FBTs. Each EBT has the same dependency list - those tables that are referenced minus the tables in the from list.

Parameters
referencedTableMap:JBitSet

The referenced table map.

outerFromList:FromList

FromList from outer query block

isNotExists:boolean

Whether or not for NOT EXISTS

Exceptions
StandardException:
Thrown on error
getFromTableByNameback to summary
pack-priv FromTable getFromTableByName(String name, String schemaName, boolean exactMatch) throws StandardException

Determine whether or not the specified name is an exposed name in the current query block.

Parameters
name:String

The specified name to search for as an exposed name.

schemaName:String

Schema name, if non-null.

exactMatch:boolean

Whether or not we need an exact match on specified schema and table names or match on table id.

Returns:FromTable

The FromTable, if any, with the exposed name.

Exceptions
StandardException:
Thrown on error
getFromTableByResultColumnback to summary
pack-priv FromTable getFromTableByResultColumn(ResultColumn rc)

Get the FromTable from this list which has the specified ResultColumn in its RCL.

Parameters
rc:ResultColumn

The ResultColumn match on.

Returns:FromTable

FromTable The matching FromTable.

getOptimizableback to summary
public Optimizable getOptimizable(int index)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.getOptimizable.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.getOptimizable.

Return the nth Optimizable in the list.

Parameters
index:int

"index" (0 based) into the list.

Returns:Optimizable

Optimizable The nth Optimizables in the list.

See Also
org.apache.derby.iapi.sql.compile.OptimizableList#getOptimizable
getTableNumbersback to summary
pack-priv int[] getTableNumbers()
getWindowsback to summary
pack-priv WindowList getWindows()
Returns:WindowList

list of window definitions associated with a SELECT.

hashJoinSpecifiedback to summary
pack-priv boolean hashJoinSpecified()

Return whether or not the user specified a hash join for any of the tables in this list.

Returns:boolean

Whether or not the user specified a hash join for any of the tables in this list.

initAccessPathsback to summary
public void initAccessPaths(Optimizer optimizer)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.initAccessPaths.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.initAccessPaths.

Init the access paths for these optimizables.

Parameters
optimizer:Optimizer

The optimizer being used.

See Also
OptimizableList#initAccessPaths
isJoinColumnForRightOuterJoinback to summary
pack-priv void isJoinColumnForRightOuterJoin(ResultColumn rc)

Go through the list of the tables and see if the passed ResultColumn is a join column for a right outer join with USING/NATURAL clause.

See Also
HalfOuterJoinNode#isJoinColumnForRightOuterJoin
legalJoinOrderback to summary
public boolean legalJoinOrder(int numTablesInQuery)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.legalJoinOrder.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.legalJoinOrder.

Tell whether the join order is legal.

See Also
OptimizableList#legalJoinOrder
LOJ_reorderableback to summary
pack-priv boolean LOJ_reorderable(int numTables) throws StandardException
markAsTransparentback to summary
pack-priv void markAsTransparent()

Indicate that this FromList is "transparent", which means that its FromTables should be bound to tables from an outer query. Generally this is not allowed, but there are exceptions. See SetOperatorNode.setResultToBooleanTrueNode() for more.

optimizeJoinOrderback to summary
public boolean optimizeJoinOrder()

Implements org.apache.derby.iapi.sql.compile.OptimizableList.optimizeJoinOrder.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.optimizeJoinOrder.

Tell whether the join order should be optimized.

See Also
OptimizableList#optimizeJoinOrder
preprocessback to summary
pack-priv void preprocess(int numTables, GroupByList gbl, ValueNode predicateTree) throws StandardException

Preprocess the query tree - this currently means: o Generating a referenced table map for each ResultSetNode. o Putting the WHERE and HAVING clauses in conjunctive normal form (CNF). o Converting the WHERE and HAVING clauses into PredicateLists and classifying them. o Flatten those FromSubqueries which can be flattened. o Ensuring that a ProjectRestrictNode is generated on top of every FromBaseTable and generated in place of every FromSubquery which could not be flattened. o Pushing single table predicates down to the new ProjectRestrictNodes.

Parameters
numTables:int

The number of tables in the DML Statement

gbl:GroupByList

The group by list, if any

Exceptions
StandardException:
Thrown on error
pushPredicatesback to summary
pack-priv void pushPredicates(PredicateList predicateList) throws StandardException

Categorize and push the predicates that are pushable.

Parameters
predicateList:PredicateList

The query's PredicateList

Exceptions
StandardException:
Thrown on error
referencesSessionSchemaback to summary
public boolean referencesSessionSchema() throws StandardException

Overrides org.apache.derby.impl.sql.compile.QueryTreeNode.referencesSessionSchema.

Return true if the node references SESSION schema tables (temporary or permanent)

Returns:boolean

true if references SESSION schema tables, else false

Annotations
@Override
Exceptions
StandardException:
Thrown on error
referencesTargetback to summary
pack-priv boolean referencesTarget(String name, boolean baseTable) throws StandardException

Search to see if a query references the specifed table name.

Parameters
name:String

Table name (String) to search for.

baseTable:boolean

Whether or not name is for a base table

Returns:boolean

true if found, else false

Exceptions
StandardException:
Thrown on error
rejectParametersback to summary
pack-priv void rejectParameters() throws StandardException

Check for (and reject) all ? parameters directly under the ResultColumns. This is done for SELECT statements.

Exceptions
StandardException:
Thrown if a ? parameter found directly under a ResultColumn
reOrderback to summary
public void reOrder(int[] joinOrder)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.reOrder.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.reOrder.

Set the join order for this list of optimizables. The join order is represented as an array of integers - each entry in the array stands for the order of the corresponding element in the list. For example, a joinOrder of {2, 0, 1} means that the 3rd Optimizable in the list (element 2, since we are zero-based) is the first one in the join order, followed by the 1st element in the list, and finally by the 2nd element in the list. This method shuffles this OptimizableList to match the join order. Obviously, the size of the array must equal the number of elements in the array, and the values in the array must be between 0 and the number of elements in the array minus 1, and the values in the array must be unique.

See Also
OptimizableList#reOrder
returnsAtMostSingleRowback to summary
pack-priv boolean returnsAtMostSingleRow(ResultColumnList rcl, ValueNode whereClause, PredicateList wherePredicates, DataDictionary dd) throws StandardException

This method is used for both subquery flattening and distinct elimination based on a uniqueness condition. For subquery flattening we want to make sure that the query block will return at most 1 row. For distinct elimination we want to make sure that the query block will not return any duplicates. This is true if every table in the from list is (a base table and the set of columns from the table that are in equality comparisons with expressions that do not include columns from the same table is a superset of any unique index on the table) or an EXISTS FBT. In addition, at least 1 of the tables in the list has a set of columns in equality comparisons with expressions that do not include column references from the same query block is a superset of a unique index on that table. (This ensures that the query block will onlyr return a single row.) This method is expected to be called after normalization and after the from list has been preprocessed. It can be called both before and after the predicates have been pulled from the where clause. The algorithm for this is as follows If any table in the query block is not a base table, give up. For each table in the query Ignore exists table since they can only produce one row create a matrix of tables and columns from the table (tableColMap) (this is used to keep track of the join columns and constants that can be used to figure out whether the rows from a join or in a select list are distinct based on unique indexes) create an array of columns from the table(eqOuterCol) (this is used to determine that only one row will be returned from a join) if the current table is the table for the result columns set the result columns in the eqOuterCol and tableColMap (if these columns are a superset of a unique index and all joining tables result in only one row, the results will be distinct) go through all the predicates and update tableColMap and eqOuterCol with join columns and correlation variables, parameters and constants since setting constants, correlation variables and parameters, reduces the number of columns required for uniqueness in a multi-column index, they are set for all the tables (if the table is not the result table, in this case only the column of the result table is set) join columns are just updated for the column in the row of the joining table. check if the marked columns in tableColMap are a superset of a unique index (This means that the join will only produce 1 row when joined with 1 row of another table) check that there is a least one table for which the columns in eqOuterCol(i.e. constant values) are a superset of a unique index (This quarantees that there will be only one row selected from this table). Once all tables have been evaluated, check that all the tables can be joined by unique index or will have only one row

Parameters
rcl:ResultColumnList

If non-null, the RCL from the query block. If non-null for subqueries, then entry can be considered as part of an = comparison.

whereClause:ValueNode

The WHERE clause to consider.

wherePredicates:PredicateList

The predicates that have already been pulled from the WHERE clause.

dd:DataDictionary

The DataDictionary to use.

Returns:boolean

Whether or not query block will return at most 1 row for a subquery, no duplicates for a distinct.

Exceptions
StandardException:
Thrown on error
setLevelback to summary
pack-priv void setLevel(int level)

Set the (query block) level (0-based) for the FromTables in this FromList.

Parameters
level:int

The query block level for this table.

setOptimizableback to summary
public void setOptimizable(int index, Optimizable optimizable)

Implements org.apache.derby.iapi.sql.compile.OptimizableList.setOptimizable.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.setOptimizable.

Set the nth Optimizable to the specified Optimizable.

Parameters
index:int

"index" (0 based) into the list.

optimizable:Optimizable

New nth Optimizable.

See Also
org.apache.derby.iapi.sql.compile.OptimizableList#setOptimizable
setPropertiesback to summary
pack-priv void setProperties(Properties props) throws StandardException

Set the Properties list for this FromList.

Exceptions
StandardException:
Thrown on error
setWindowsback to summary
pack-priv void setWindows(WindowList windows)

Set windows field to the supplied value.

Parameters
windows:WindowList

list of window definitions associated with a SELECT.

tableNumberIsNotExistsback to summary
pack-priv boolean tableNumberIsNotExists(int tableNumber) throws StandardException

determine whether this table is NOT EXISTS. This routine searches for the indicated table number in the fromlist and returns TRUE if the table is present in the from list and is marked NOT EXISTS, false otherwise. A table may be present in the from list for NOT EXISTS if it is used as a correlated NOT EXISTS subquery. In such a situation, when the subquery is flattened, it is important that we remember that this is a NOT EXISTS subquery, because the join semantics are different (we're looking for rows that do NOT match, rather than rows that do). And since the join semantics are different, we cannot include this table into a transitive closure of equijoins (See DERBY-3033 for a situation where this occurs).

Parameters
tableNumber:int

which table to check

Returns:boolean

true if this table is in the from list as NOT EXISTS

updateTargetLockModeback to summary
pack-priv int updateTargetLockMode()

Get the lock mode for the target of an update statement (a delete or update). The update mode will always be row for CurrentOfNodes. It will be table if there is no where clause.

Returns:int

The lock mode

useStatisticsback to summary
public boolean useStatistics()

Implements org.apache.derby.iapi.sql.compile.OptimizableList.useStatistics.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.useStatistics.

user can specify that s/he doesn't want statistics to be considered when optimizing the query.

See Also
OptimizableList#useStatistics
verifyPropertiesback to summary
public void verifyProperties(DataDictionary dDictionary) throws StandardException

Implements org.apache.derby.iapi.sql.compile.OptimizableList.verifyProperties.

Doc from org.apache.derby.iapi.sql.compile.OptimizableList.verifyProperties.

Verify that the Properties list with optimizer overrides, if specified, is valid

Parameters
dDictionary:DataDictionary

The DataDictionary to use.

Exceptions
StandardException:
Thrown on error
See Also
OptimizableList#verifyProperties