Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.derby.impl.sql.compile
Class FromBaseTable  view FromBaseTable download FromBaseTable.java

java.lang.Object
  extended byorg.apache.derby.impl.sql.compile.QueryTreeNode
      extended byorg.apache.derby.impl.sql.compile.ResultSetNode
          extended byorg.apache.derby.impl.sql.compile.FromTable
              extended byorg.apache.derby.impl.sql.compile.FromBaseTable
All Implemented Interfaces:
org.apache.derby.iapi.sql.compile.Optimizable, org.apache.derby.iapi.sql.compile.Visitable

public class FromBaseTable
extends FromTable

A FromBaseTable represents a table in the FROM list of a DML statement, as distinguished from a FromSubquery, which represents a subquery in the FROM list. A FromBaseTable may actually represent a view. During parsing, we can't distinguish views from base tables. During binding, when we find FromBaseTables that represent views, we replace them with FromSubqueries. By the time we get to code generation, all FromSubqueries have been eliminated, and all FromBaseTables will represent only true base tables.

Positioned Update: Currently, all columns of an updatable cursor are selected to deal with a positioned update. This is because we don't know what columns will ultimately be needed from the UpdateNode above us. For example, consider:



 	get c as 'select cint from t for update of ctinyint'
  update t set ctinyint = csmallint

 
Ideally, the cursor only selects cint. Then, something akin to an IndexRowToBaseRow is generated to take the CursorResultSet and get the appropriate columns out of the base table from the RowLocation retunrned by the cursor. Then the update node can generate the appropriate NormalizeResultSet (or whatever else it might need) to get things into the correct format for the UpdateResultSet. See CurrentOfNode for more information.


Field Summary
(package private)  org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor baseConglomerateDescriptor
           
(package private)  PredicateList baseTableRestrictionList
          Restriction as a PredicateList
(package private)  int bulkFetch
           
(package private)  boolean bulkFetchTurnedOff
           
private  java.lang.String[] columnNames
           
(package private)  org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor[] conglomDescs
           
static int DELETE
           
private  org.apache.derby.iapi.util.JBitSet dependencyMap
           
private  boolean distinctScan
           
private  boolean existsBaseTable
           
private  int[] fkColArray
           
private  long fkIndexConglomId
           
private  boolean getUpdateLocks
           
private  boolean gotRowCount
           
private  boolean isNotExists
           
(package private)  PredicateList nonBaseTableRestrictionList
           
(package private)  PredicateList nonStoreRestrictionList
           
private  boolean raDependentScan
          Information for dependent table scan for Referential Actions
private  java.lang.String raParentResultSetId
           
private  org.apache.derby.iapi.services.io.FormatableBitSet referencedCols
           
(package private)  PredicateList requalificationRestrictionList
           
(package private)  PredicateList restrictionList
           
private  long rowCount
           
private  double singleScanRowCount
           
private  boolean specialMaxScan
           
(package private)  PredicateList storeRestrictionList
           
(package private)  org.apache.derby.iapi.sql.dictionary.TableDescriptor tableDescriptor
           
(package private)  TableName tableName
           
private  ResultColumnList templateColumns
           
(package private) static int UNSET
           
static int UPDATE
           
(package private)  int updateOrDelete
           
 
Fields inherited from class org.apache.derby.impl.sql.compile.FromTable
bestAccessPath, bestCostEstimate, bestSortAvoidancePath, correlationName, corrTableName, currentAccessPath, hashKeyColumns, initialCapacity, level, loadFactor, maxCapacity, tableNumber, tableProperties, trulyTheBestAccessPath, userSpecifiedJoinStrategy
 
Fields inherited from class org.apache.derby.impl.sql.compile.ResultSetNode
costEstimate, cursorTargetTable, insertSource, optimizer, referencedTableMap, resultColumns, resultSetNumber, scratchCostEstimate, statementResultSet
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, beginOffset, endOffset
 
Constructor Summary
FromBaseTable()
           
 
Method Summary
 ResultColumnList addColsToList(ResultColumnList inputRcl, org.apache.derby.iapi.services.io.FormatableBitSet colsWeWant)
          Augment the RCL to include the columns in the FormatableBitSet.
private  long baseRowCount()
           
 void bindExpressions(FromList fromListParam)
          Bind the expressions in this FromBaseTable.
 ResultSetNode bindNonVTITables(org.apache.derby.iapi.sql.dictionary.DataDictionary dataDictionary, FromList fromListParam)
          Bind the table in this FromBaseTable.
 void bindResultColumns(FromList fromListParam)
          Bind the result columns of this ResultSetNode when there is no base table to bind them to.
private  org.apache.derby.iapi.sql.dictionary.TableDescriptor bindTableDescriptor()
          Bind the table descriptor for this table.
protected  boolean canBeOrdered()
          Tell super-class that this Optimizable can be ordered
 ResultSetNode changeAccessPath()
          The optimizer's decision on the access path for a result set may require the generation of extra result sets.
(package private)  void clearDependency(java.util.Vector locations)
          Clear the bits from the dependency map when join nodes are flattened
 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 disableBulkFetch()
          Turn off bulk fetch
(package private)  void doSpecialMaxScan()
          Do a special scan for max.
 org.apache.derby.iapi.sql.compile.CostEstimate estimateCost(org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd, org.apache.derby.iapi.sql.compile.CostEstimate outerCost, org.apache.derby.iapi.sql.compile.Optimizer optimizer, org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
          Estimate the cost of scanning this Optimizable using the given predicate list with the given conglomerate.
 boolean forUpdate()
          Return true if this is the target table of an update
 void generate(ActivationClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
          Generation on a FromBaseTable creates a scan on the optimizer-selected conglomerate.
private  void generateDistinctScan(ExpressionClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
           
private  void generateMaxSpecialResultSet(ExpressionClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
           
private  void generateRefActionDependentTableScan(ExpressionClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
          Generation on a FromBaseTable for a referential action dependent table.
 void generateResultSet(ExpressionClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
          Generation on a FromBaseTable for a SELECT.
protected  ResultSetNode genProjectRestrict(int numTables)
          Put a ProjectRestrictNode on top of each FromTable in the FromList.
 ResultColumnList genResultColList()
          Build a ResultColumnList based on all of the columns in this FromBaseTable.
 ResultColumnList getAllResultColumns(TableName allTableName)
          Return a ResultColumnList with all of the columns in this table.
private  org.apache.derby.iapi.store.access.StoreCostController getBaseCostController()
           
 java.lang.String getBaseTableName()
          Get the table name of this Optimizable.
private  void getConglomDescs()
           
private  int getDefaultBulkFetch()
           
(package private)  boolean getExistsBaseTable()
          Does this FBT represent an EXISTS FBT.
 java.lang.String getExposedName()
          Return the exposed name for this table, which is the name that can be used to refer to this table in the rest of the query.
 org.apache.derby.iapi.sql.compile.CostEstimate getFinalCostEstimate()
          Get the final CostEstimate for this ResultSetNode.
private  org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor getFirstConglom()
           
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.
 ResultColumn getMatchingColumn(ColumnReference columnReference)
          Try to find a ResultColumn in the table represented by this FromBaseTable that matches the name in the given ColumnReference.
private  org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor getNextConglom(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor currCD)
           
private  org.apache.derby.iapi.types.DataValueDescriptor[] getRowTemplate(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd, org.apache.derby.iapi.store.access.StoreCostController scc)
           
private  int getScanArguments(ExpressionClassBuilder acb, org.apache.derby.iapi.services.compiler.MethodBuilder mb)
           
private  org.apache.derby.iapi.store.access.StoreCostController getStoreCostController(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd)
           
 org.apache.derby.iapi.sql.dictionary.TableDescriptor getTableDescriptor()
          Get the table descriptor for this table (if any).
 TableName getTableName()
          Return a TableName node representing this FromTable.
 TableName getTableNameField()
          Return the table name for this table.
private  java.lang.String getUserSpecifiedIndexName()
           
 void init(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Initializer for a table in a FROM list.
 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(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd)
          Return whether or not this is a covering index.
 boolean isMaterializable()
          Tell whether this Optimizable is materializable
 boolean isNotExists()
          Return whether or not this is actually a EBT for NOT EXISTS.
 boolean isOneRowResultSet()
          Return whether or not the underlying ResultSet tree will return a single row, at most.
private  boolean isOneRowResultSet(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd, org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList)
          Is this a one-row result set with the given conglomerate descriptor?
 boolean isOneRowResultSet(org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList)
           
 boolean isOneRowScan()
          Will the optimizable return at most 1 row per scan?
private  boolean isOrdered(ColumnReference[] crs, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd)
          Return whether or not this index is ordered on a permutation of the specified columns.
(package private)  boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, java.util.Vector fbtVector)
          Return whether or not the underlying ResultSet tree is ordered on the specified columns.
(package private)  boolean isPossibleDistinctScan()
          Is it possible to do a distinct scan on this ResultSet tree.
private  boolean isStrictlyOrdered(ColumnReference[] crs, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd)
          Return whether or not this index is ordered on a permutation of the specified columns.
 boolean isTargetTable()
          Is the optimizable the target table of an update or delete?
 boolean legalJoinOrder(org.apache.derby.iapi.util.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 base table.
 org.apache.derby.iapi.util.JBitSet LOJgetReferencedTables(int numTables)
           
private  int mapAbsoluteToRelativeColumnPosition(int absolutePosition)
          Convert an absolute to a relative 0-based column position.
 boolean markAsCursorTargetTable()
          Mark this ResultSetNode as the target table of an updatable cursor.
(package private)  void markForDistinctScan()
          Mark the underlying scan as a distinct scan.
(package private)  void markOrderingDependent()
          Notify the underlying result set tree that the result is ordering dependent.
(package private)  void markUpdated(ResultColumnList 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.
 boolean memoryUsageOK(double rowCount, int maxMemoryPerTable)
           
private  ResultColumnList newResultColumns(ResultColumnList oldColumns, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor idxCD, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor heapCD, boolean cloneRCs)
          Create a new ResultColumnList to reflect the columns in the index described by the given ConglomerateDescriptor.
 boolean nextAccessPath(org.apache.derby.iapi.sql.compile.Optimizer optimizer, org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList, org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
          Choose the next access path to evaluate for this Optimizable.
 org.apache.derby.iapi.sql.compile.CostEstimate optimizeIt(org.apache.derby.iapi.sql.compile.Optimizer optimizer, org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList, org.apache.derby.iapi.sql.compile.CostEstimate outerCost, org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
          Choose the best access path for this Optimizable.
 ResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList)
          Preprocess a ResultSetNode - this currently means: o Generating a referenced table map for each ResultSetNode.
 void pullOptPredicates(org.apache.derby.iapi.sql.compile.OptimizablePredicateList optimizablePredicates)
          Pull all the OptimizablePredicates from this Optimizable and put them in the given OptimizablePredicateList.
 boolean pushOptPredicate(org.apache.derby.iapi.sql.compile.OptimizablePredicate optimizablePredicate)
          Push an OptimizablePredicate down, if this node accepts it.
 boolean referencesSessionSchema()
          Return true if the node references SESSION schema tables (temporary or permanent)
 boolean referencesTarget(java.lang.String name, boolean baseTable)
          Search to see if a query references the specifed table name.
private  double scanCostAfterSelectivity(double originalScanCost, double initialPositionCost, double selectivity, boolean anotherIndexUnique)
           
(package private)  void setExistsBaseTable(boolean existsBaseTable, org.apache.derby.iapi.util.JBitSet dependencyMap, boolean isNotExists)
          Set whether or not this FBT represents an EXISTS FBT.
private  void setLockingBasedOnThreshold(org.apache.derby.iapi.sql.compile.Optimizer optimizer, double rowsTouched)
           
 void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, java.lang.String parentResultSetId, boolean dependentScan)
          set the Information gathered from the parent table that is required to peform a referential action on dependent table.
 void setTableProperties(java.util.Properties tableProperties)
          Set the table properties for this table.
 void startOptimizing(org.apache.derby.iapi.sql.compile.Optimizer optimizer, org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
          Begin the optimization process for this Optimizable.
protected  boolean supersetOfUniqueIndex(boolean[] eqCols)
          Determine whether or not the columns marked as true in the passed in array are a superset of any unique index on this table.
protected  boolean supersetOfUniqueIndex(org.apache.derby.iapi.util.JBitSet[] tableColMap)
          Determine whether or not the columns marked as true in the passed in join table matrix are a superset of any single column unique index on this table.
 java.lang.String toString()
          Convert this object to a String.
 double uniqueJoin(org.apache.derby.iapi.sql.compile.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.
 int updateTargetLockMode()
          Get the lock mode for the target table heap of an update or delete statement.
 void verifyProperties(org.apache.derby.iapi.sql.dictionary.DataDictionary dDictionary)
          Verify that the Properties list with optimizer overrides, if specified, is valid
 
Methods inherited from class org.apache.derby.impl.sql.compile.FromTable
areAllColumnsProjected, assignCostEstimate, considerSortAvoidancePath, decrementLevel, feasibleJoinStrategy, fillInReferencedTableMap, flatten, getBestAccessPath, getBestSortAvoidancePath, getCostEstimate, getCurrentAccessPath, getLevel, getName, getNumColumnsReturned, getProperties, getResultColumnsForList, getSchemaDescriptor, getSchemaDescriptor, getScratchCostEstimate, getTableNumber, getTrulyTheBestAccessPath, getUserSpecifiedJoinStrategy, hashKeyColumns, hasTableNumber, init, initAccessPaths, isFlattenableJoinNode, markUpdatableByCursor, maxCapacity, modifyAccessPath, needsSpecialRCLBinding, optimizeSubqueries, pushExpressions, rememberAsBest, rememberJoinStrategyAsBest, rememberSortAvoidancePath, resetJoinStrategies, setAllColumnsProjected, setCostEstimate, setHashKeyColumns, setLevel, setProperties, setTableNumber, supportsMultipleInstantiations, tellRowOrderingAboutConstantColumns, transformOuterJoins
 
Methods inherited from class org.apache.derby.impl.sql.compile.ResultSetNode
accept, addNewPredicate, assignResultSetNumber, bindExpressionsWithTables, bindResultColumns, bindTargetExpressions, bindUntypedNullsToResultColumns, bindVTITables, closeMethodArgument, columnTypesAndLengthsMatch, considerMaterialization, enhanceRCLForInsert, ensurePredicateList, flattenableInFromSubquery, generateNormalizationResultSet, genNewRCForInsert, genNormalizeResultSetNode, genProjectRestrict, genProjectRestrictForReordering, getCostEstimate, getCursorTargetTable, getFromList, getNewCostEstimate, getOptimizer, getReferencedTableMap, getResultColumns, getResultSetNumber, isUpdatableCursor, makeResultDescription, makeResultDescriptors, markStatementResultSet, modifyAccessPaths, notCursorTargetTable, notFlattenableJoin, numDistinctAggregates, optimize, parseDefault, performMaterialization, printSubNodes, projectResultColumns, pushOrderByList, rejectParameters, rejectXMLValues, renameGeneratedResultNames, replaceDefaults, returnsAtMostOneRow, setInsertSource, setReferencedTableMap, setResultColumns, setResultToBooleanTrueNode, setTableConstructorTypes, subqueryReferencesTarget, verifySelectStarSubquery
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
bind, convertDefaultNode, debugFlush, debugPrint, executeSchemaName, executeStatementName, formatNodeString, foundString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getRowEstimate, getSchemaDescriptor, getSchemaDescriptor, getSPSName, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, needsSavepoint, nodeHeader, optimize, parseQueryText, printLabel, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, treePrint, treePrint, verifyClassExist
 
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

UNSET

static final int UNSET
See Also:
Constant Field Values

tableName

TableName tableName

tableDescriptor

org.apache.derby.iapi.sql.dictionary.TableDescriptor tableDescriptor

baseConglomerateDescriptor

org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor baseConglomerateDescriptor

conglomDescs

org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor[] conglomDescs

updateOrDelete

int updateOrDelete

bulkFetch

int bulkFetch

bulkFetchTurnedOff

boolean bulkFetchTurnedOff

singleScanRowCount

private double singleScanRowCount

referencedCols

private org.apache.derby.iapi.services.io.FormatableBitSet referencedCols

templateColumns

private ResultColumnList templateColumns

columnNames

private java.lang.String[] columnNames

specialMaxScan

private boolean specialMaxScan

distinctScan

private boolean distinctScan

raDependentScan

private boolean raDependentScan
Information for dependent table scan for Referential Actions


raParentResultSetId

private java.lang.String raParentResultSetId

fkIndexConglomId

private long fkIndexConglomId

fkColArray

private int[] fkColArray

baseTableRestrictionList

PredicateList baseTableRestrictionList
Restriction as a PredicateList


nonBaseTableRestrictionList

PredicateList nonBaseTableRestrictionList

restrictionList

PredicateList restrictionList

storeRestrictionList

PredicateList storeRestrictionList

nonStoreRestrictionList

PredicateList nonStoreRestrictionList

requalificationRestrictionList

PredicateList requalificationRestrictionList

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

existsBaseTable

private boolean existsBaseTable

isNotExists

private boolean isNotExists

dependencyMap

private org.apache.derby.iapi.util.JBitSet dependencyMap

getUpdateLocks

private boolean getUpdateLocks

gotRowCount

private boolean gotRowCount

rowCount

private long rowCount
Constructor Detail

FromBaseTable

public FromBaseTable()
Method Detail

init

public void init(java.lang.Object arg1,
                 java.lang.Object arg2,
                 java.lang.Object arg3,
                 java.lang.Object arg4)
Initializer for a table in a FROM list.

Overrides:
init in class QueryTreeNode

LOJ_reorderable

public boolean LOJ_reorderable(int numTables)
                        throws org.apache.derby.iapi.error.StandardException
no LOJ reordering for base table.

Overrides:
LOJ_reorderable in class FromTable

LOJgetReferencedTables

public org.apache.derby.iapi.util.JBitSet LOJgetReferencedTables(int numTables)
                                                          throws org.apache.derby.iapi.error.StandardException
Overrides:
LOJgetReferencedTables in class ResultSetNode

nextAccessPath

public boolean nextAccessPath(org.apache.derby.iapi.sql.compile.Optimizer optimizer,
                              org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList,
                              org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
                       throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Choose the next access path to evaluate for this Optimizable.

Specified by:
nextAccessPath in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
nextAccessPath in class FromTable

canBeOrdered

protected boolean canBeOrdered()
Tell super-class that this Optimizable can be ordered

Overrides:
canBeOrdered in class FromTable

optimizeIt

public org.apache.derby.iapi.sql.compile.CostEstimate optimizeIt(org.apache.derby.iapi.sql.compile.Optimizer optimizer,
                                                                 org.apache.derby.iapi.sql.compile.OptimizablePredicateList predList,
                                                                 org.apache.derby.iapi.sql.compile.CostEstimate outerCost,
                                                                 org.apache.derby.iapi.sql.compile.RowOrdering rowOrdering)
                                                          throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Choose the best access path for this Optimizable.

Specified by:
optimizeIt in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
optimizeIt in class FromTable

getTableDescriptor

public org.apache.derby.iapi.sql.dictionary.TableDescriptor getTableDescriptor()
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Get the table descriptor for this table (if any). Only base tables have table descriptors - for the rest of the optimizables, this method returns null.

Specified by:
getTableDescriptor in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
getTableDescriptor in class FromTable

isMaterializable

public boolean isMaterializable()
                         throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Tell whether this Optimizable is materializable

Specified by:
isMaterializable in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
isMaterializable in class FromTable

pushOptPredicate

public boolean pushOptPredicate(org.apache.derby.iapi.sql.compile.OptimizablePredicate optimizablePredicate)
                         throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Push an OptimizablePredicate down, if this node accepts it.

Specified by:
pushOptPredicate in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
pushOptPredicate in class FromTable

pullOptPredicates

public void pullOptPredicates(org.apache.derby.iapi.sql.compile.OptimizablePredicateList optimizablePredicates)
                       throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Pull all the OptimizablePredicates from this Optimizable and put them in the given OptimizablePredicateList.

Specified by:
pullOptPredicates in interface org.apache.derby.iapi.sql.compile.Optimizable
Overrides:
pullOptPredicates in class FromTable

isCoveringIndex

public boolean isCoveringIndex(org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor cd)
                        throws org.apache.derby.iapi.error.StandardException
Description copied from interface: org.apache.derby.iapi.sql.compile.Optimizable
Return whether or not this is a covering index. We expect to call this during generation, after access path selection is complete.

Specified by:
isCoveringIndex in interface org.apache.derby.