Visitable
FromTable
, MaterializeSubqueryNode
, SelectNode
public abstract class ResultSetNode extends QueryTreeNode
Modifier and Type | Class | Description |
---|---|---|
(package private) static class |
ResultSetNode.QueryExpressionClauses |
For ease of pushing order by, offset and fetch first/next clauses into
nodes.
|
Modifier and Type | Field | Description |
---|---|---|
private CostEstimate |
candidateFinalCostEstimate |
|
private CostEstimate |
costEstimate |
|
private boolean |
cursorTargetTable |
|
private boolean |
insertSource |
|
private Optimizer |
optimizer |
|
private JBitSet |
referencedTableMap |
|
private ResultColumnList |
resultColumns |
|
private int |
resultSetNumber |
|
private CostEstimate |
scratchCostEstimate |
|
private boolean |
statementResultSet |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor | Description |
---|---|
ResultSetNode(ContextManager cm) |
Modifier and Type | Method | Description |
---|---|---|
(package private) void |
acceptChildren(Visitor v) |
Accept the visitor for all visitable children of this node.
|
(package private) ResultSetNode |
addNewPredicate(Predicate predicate) |
Add a new predicate to the list.
|
(package private) void |
adjustForSortElimination() |
Notify the underlying result set tree that the optimizer has chosen
to "eliminate" a sort.
|
(package private) void |
adjustForSortElimination(RequiredRowOrdering rowOrdering) |
Same goal as adjustForSortElimination above, but this version
takes a RequiredRowOrdering to allow nodes to adjust based on
the ORDER BY clause, if needed.
|
(package private) void |
assignResultSetNumber() |
Assign the next resultSetNumber to the resultSetNumber in this ResultSetNode.
|
(package private) void |
bindExpressions(FromList fromListParam) |
Bind the expressions in this ResultSetNode.
|
(package private) void |
bindExpressionsWithTables(FromList fromListParam) |
Bind the expressions in this ResultSetNode if it has tables.
|
(package private) ResultSetNode |
bindNonVTITables(DataDictionary dataDictionary,
FromList fromListParam) |
Bind the non VTI tables in this ResultSetNode.
|
(package private) void |
bindResultColumns(TableDescriptor targetTableDescriptor,
FromVTI targetVTI,
ResultColumnList targetColumnList,
DMLStatementNode statement,
FromList fromListParam) |
Bind the result columns for this ResultSetNode to a base table.
|
(package private) void |
bindResultColumns(FromList fromListParam) |
Bind the result columns of this ResultSetNode when there is no
base table to bind them to.
|
(package private) void |
bindTargetExpressions(FromList fromListParam) |
Bind the expressions in the target list.
|
(package private) void |
bindUntypedNullsToResultColumns(ResultColumnList rcl) |
Bind untyped nulls to the types in the given ResultColumnList.
|
(package private) ResultSetNode |
bindVTITables(FromList fromListParam) |
Bind the VTI tables in this ResultSetNode.
|
(package private) ResultSetNode |
changeAccessPath() |
The optimizer's decision on the access path for a result set
may require the generation of extra result sets.
|
(package private) boolean |
columnTypesAndLengthsMatch() |
|
(package private) ResultSetNode |
considerMaterialization(JBitSet outerTables) |
Consider materialization for this ResultSet tree if it is valid and cost effective
(It is not valid if incorrect results would be returned.)
|
private ResultColumn |
createGeneratedColumn(TableDescriptor targetTD,
ColumnDescriptor colDesc) |
Create a ResultColumn for a column with a generation clause.
|
(package private) abstract void |
decrementLevel(int decrement) |
Decrement (query block) level (0-based) for
all of the tables in this ResultSet tree.
|
(package private) ResultSetNode |
enhanceRCLForInsert(InsertNode target,
boolean inOrder,
int[] colMap) |
This ResultSet is the source for an Insert.
|
(package private) ResultSetNode |
ensurePredicateList(int numTables) |
Ensure that the top of the RSN tree has a PredicateList.
|
(package private) void |
fillInReferencedTableMap(JBitSet passedMap) |
Fill the referencedTableMap with this ResultSetNode.
|
(package private) boolean |
flattenableInFromSubquery(FromList fromList) |
Evaluate whether or not the subquery in a FromSubquery is flattenable.
|
(package private) void |
generateNormalizationResultSet(ActivationClassBuilder acb,
MethodBuilder mb,
int resultSetNumber,
ResultDescription resultDescription) |
Generate the code for a NormalizeResultSet.
|
private ResultSetNode |
generateProjectRestrictForInsert(InsertNode target,
int[] colMap) |
Generate a ProjectRestrictNode to put on top of this node if it's the
source for an insert, and the RCL needs reordering and/or addition of
columns in order to match the target RCL.
|
(package private) void |
generateResultSet(ExpressionClassBuilder acb,
MethodBuilder mb) |
General logic shared by Core compilation and by the Replication Filter
compiler.
|
private ResultColumn |
genNewRCForInsert(TableDescriptor targetTD,
FromVTI targetVTI,
int columnNumber,
DataDictionary dataDictionary) |
Generate the RC/expression for an unspecified column in an insert.
|
(package private) ResultSetNode |
genProjectRestrict() |
Put a ProjectRestrictNode on top of this ResultSetNode.
|
(package private) ResultSetNode |
genProjectRestrict(int numTables) |
Put a ProjectRestrictNode on top of each FromTable in the FromList.
|
(package private) ResultSetNode |
genProjectRestrictForReordering() |
Get a parent ProjectRestrictNode above us.
|
(package private) ResultColumnList |
getAllResultColumns(TableName allTableName) |
Expand "*" into a ResultColumnList with all of the columns
in the table's result list.
|
(package private) CostEstimate |
getCandidateFinalCostEstimate() |
Get the final cost estimate which we've set so far
|
(package private) CostEstimate |
getCostEstimate() |
Get the CostEstimate for this ResultSetNode.
|
(package private) FromTable |
getCursorTargetTable() |
return the target table of an updatable cursor result set.
|
(package private) CostEstimate |
getFinalCostEstimate() |
Get the final CostEstimate for this ResultSetNode.
|
(package private) FromList |
getFromList() |
Get the FromList.
|
(package private) 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.
|
(package private) ResultColumn |
getMatchingColumn(ColumnReference columnReference) |
Try to find a ResultColumn in the table represented by this FromTable
that matches the name in the given ColumnReference.
|
protected CostEstimate |
getNewCostEstimate() |
Get a cost estimate to use for this ResultSetNode.
|
(package private) Optimizer |
getOptimizer() |
Get the optimizer being used on this result set
|
protected OptimizerImpl |
getOptimizerImpl() |
Get the optimizer for this result set.
|
(package private) ResultColumnList |
getRCLForInsert(InsertNode target,
int[] colMap) |
Generate an RCL that can replace the original RCL of this node to
match the RCL of the target for the insert.
|
JBitSet |
getReferencedTableMap() |
Get the referencedTableMap for this ResultSetNode.
|
(package private) ResultColumnList |
getResultColumns() |
Get the resultColumns for this ResultSetNode
|
int |
getResultSetNumber() |
Get the resultSetNumber in this ResultSetNode.
|
(package private) CostEstimate |
getScratchCostEstimate() |
Get the scratch estimate
|
(package private) boolean |
isCursorTargetTable() |
Return true if this is a cursor target table
|
(package private) boolean |
isInsertSource() |
Return true if this is the source result set for an INSERT
|
(package private) boolean |
isNotExists() |
Return whether or not the underlying ResultSet tree is for a NOT EXISTS
join.
|
(package private) boolean |
isOneRowResultSet() |
Return whether or not the underlying ResultSet tree will return
a single row, at most.
|
(package private) boolean |
isOrderedOn(ColumnReference[] crs,
boolean permuteOrdering,
java.util.List<FromBaseTable> fbtHolder) |
Return whether or not the underlying ResultSet tree
is ordered on the specified columns.
|
(package private) boolean |
isPossibleDistinctScan(java.util.Set<BaseColumnNode> distinctColumns) |
Is it possible to do a distinct scan on this ResultSet tree.
|
(package private) boolean |
isStatementResultSet() |
Return true if this is a statement result set
|
(package private) boolean |
isUpdatableCursor(DataDictionary dd) |
Determine if this result set is updatable or not, for a cursor
(i.e., is it a cursor-updatable select).
|
(package private) JBitSet |
LOJgetReferencedTables(int numTables) |
|
ResultDescription |
makeResultDescription() |
Make a ResultDescription for use in a ResultSet.
|
(package private) ResultColumnDescriptor[] |
makeResultDescriptors() |
|
(package private) 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 |
markStatementResultSet() |
This method is overridden to allow a resultset node to know
if it is the one controlling the statement -- i.e., it is
the outermost result set node for the statement.
|
(package private) ResultSetNode |
modifyAccessPaths() |
Modify the access paths according to the decisions the optimizer
made.
|
(package private) ResultSetNode |
modifyAccessPaths(PredicateList predList) |
Modify the access paths according to the decisions the optimizer
made.
|
(package private) void |
notCursorTargetTable() |
Mark this ResultSetNode as *not* the target table of an updatable
cursor.
|
(package private) void |
notFlattenableJoin() |
Mark this node and its children as not being a flattenable join.
|
(package private) static int |
numDistinctAggregates(java.util.List<AggregateNode> aggregates) |
Count the number of distinct aggregates in the list.
|
(package private) ResultSetNode |
optimize(DataDictionary dataDictionary,
PredicateList predicates,
double outerRows) |
Optimize a ResultSetNode.
|
ValueNode |
parseDefault(java.lang.String defaultText) |
Parse a default and turn it into a query tree.
|
(package private) boolean |
performMaterialization(JBitSet outerTables) |
Return whether or not to materialize this ResultSet tree.
|
(package private) ResultSetNode |
preprocess(int numTables,
GroupByList gbl,
FromList fromList) |
Preprocess a ResultSetNode - this currently means:
o Generating a referenced table map for each ResultSetNode.
|
(package private) void |
printQueryExpressionSuffixClauses(int depth,
ResultSetNode.QueryExpressionClauses qec) |
|
(package private) void |
printSubNodes(int depth) |
Prints the sub-nodes of this object.
|
(package private) void |
projectResultColumns() |
Find the unreferenced result columns and project them out.
|
(package private) void |
pushOffsetFetchFirst(ValueNode offset,
ValueNode fetchFirst,
boolean hasJDBClimitClause) |
Push down the offset and fetch first parameters, if any.
|
(package private) void |
pushOrderByList(OrderByList orderByList) |
Push the order by list down from the cursor node
into its child result set so that the optimizer
has all of the information that it needs to
consider sort avoidance.
|
(package private) void |
pushQueryExpressionSuffix() |
Set up a new level for order by and fetch/offset clauses.
|
(package private) boolean |
referencesTarget(java.lang.String name,
boolean baseTable) |
Search to see if a query references the specifed table name.
|
(package private) void |
rejectParameters() |
Check for (and reject) ?
|
(package private) void |
rejectXMLValues() |
Check for (and reject) XML values directly under the ResultColumns.
|
(package private) void |
renameGeneratedResultNames() |
Rename generated result column names as '1', '2' etc...
|
(package private) void |
replaceOrForbidDefaults(TableDescriptor ttd,
ResultColumnList tcl,
boolean allowDefaults) |
Replace any DEFAULTs with the associated tree for the default if
allowed, or flag (when inside top level set operator nodes).
|
(package private) boolean |
returnsAtMostOneRow() |
Return whether or not this ResultSet tree is guaranteed to return
at most 1 row based on heuristics.
|
(package private) void |
setCandidateFinalCostEstimate(CostEstimate ce) |
Set the final cost estimate
|
(package private) void |
setCostEstimate(CostEstimate ce) |
Set the CostEstimate for this ResultSetNode
|
(package private) void |
setCursorTargetTable(boolean yesOrNo) |
Set whether this is a cursor target table
|
(package private) void |
setInsertSource() |
Remember that this node is the source result set for an INSERT.
|
(package private) void |
setOptimizer(Optimizer opt) |
Set the optimizer for use on this result set
|
(package private) void |
setReferencedTableMap(JBitSet newRTM) |
Set the referencedTableMap in this ResultSetNode
|
(package private) void |
setResultColumns(ResultColumnList newRCL) |
Set the resultColumns in this ResultSetNode
|
(package private) void |
setResultSetNumber(int rsn) |
|
(package private) ResultSetNode |
setResultToBooleanTrueNode(boolean onlyConvertAlls) |
Set the result column for the subquery to a boolean true,
Useful for transformations such as
changing:
where exists (select ... from ...)
|
(package private) void |
setScratchCostEstimate(CostEstimate ce) |
Set the scratch estimate
|
(package private) void |
setTableConstructorTypes(ResultColumnList typeColumns) |
Set the type of each parameter in the result column list for this
table constructor.
|
(package private) boolean |
subqueryReferencesTarget(java.lang.String name,
boolean baseTable) |
Return whether or not this ResultSetNode contains a subquery with a
reference to the specified target.
|
java.lang.String |
toString() |
Convert this object to a String.
|
(package private) int |
updateTargetLockMode() |
Get the lock mode for the target of an update statement
(a delete or update).
|
(package private) void |
verifySelectStarSubquery(FromList outerFromList,
int subqueryType) |
Verify that a SELECT * is valid for this type of subquery.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
accept, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generate, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExist
private int resultSetNumber
private JBitSet referencedTableMap
private ResultColumnList resultColumns
private boolean statementResultSet
private boolean cursorTargetTable
private boolean insertSource
private CostEstimate costEstimate
private CostEstimate scratchCostEstimate
private Optimizer optimizer
private CostEstimate candidateFinalCostEstimate
ResultSetNode(ContextManager cm)
public java.lang.String toString()
toString
in class QueryTreeNode
void printSubNodes(int depth)
printSubNodes
in class QueryTreeNode
depth
- The depth of this node in the treeboolean isStatementResultSet()
boolean isCursorTargetTable()
void setCursorTargetTable(boolean yesOrNo)
CostEstimate getScratchCostEstimate()
void setScratchCostEstimate(CostEstimate ce)
public int getResultSetNumber()
void setResultSetNumber(int rsn)
CostEstimate getCostEstimate()
void setCostEstimate(CostEstimate ce)
CostEstimate getFinalCostEstimate() throws StandardException
StandardException
CostEstimate getCandidateFinalCostEstimate()
void setCandidateFinalCostEstimate(CostEstimate ce)
void assignResultSetNumber() throws StandardException
StandardException
- Thrown on errorResultSetNode bindNonVTITables(DataDictionary dataDictionary, FromList fromListParam) throws StandardException
dataDictionary
- The DataDictionary to use for bindingfromListParam
- FromList to use/append to.StandardException
- Thrown on errorResultSetNode bindVTITables(FromList fromListParam) throws StandardException
fromListParam
- FromList to use/append to.StandardException
- Thrown on errorvoid bindExpressions(FromList fromListParam) throws StandardException
fromListParam
- FromList to use/append to.StandardException
- Thrown on errorvoid bindExpressionsWithTables(FromList fromListParam) throws StandardException
fromListParam
- FromList to use/append to.StandardException
- Thrown on errorvoid bindTargetExpressions(FromList fromListParam) throws StandardException
StandardException
- Thrown on errorvoid setTableConstructorTypes(ResultColumnList typeColumns) throws StandardException
typeColumns
- The ResultColumnList containing the desired result
types.StandardException
- Thrown on errorvoid setInsertSource()
boolean isInsertSource()
void verifySelectStarSubquery(FromList outerFromList, int subqueryType) throws StandardException
outerFromList
- The FromList from the outer query block(s)subqueryType
- The subquery typeStandardException
- Thrown on errorResultColumnList getAllResultColumns(TableName allTableName) throws StandardException
allTableName
- The qualifier on the "*"null
if
allTableName
is non-null and doesn't match a table name in
this result setStandardException
- Thrown on errorResultColumn getMatchingColumn(ColumnReference columnReference) throws StandardException
columnReference
- The columnReference whose name we're looking
for in the given table.StandardException
- Thrown on errorResultSetNode setResultToBooleanTrueNode(boolean onlyConvertAlls) throws StandardException
onlyConvertAlls
- Boolean, whether or not to just convert *'sStandardException
- Thrown on errorFromList getFromList() throws StandardException
StandardException
- Thrown on errorvoid bindResultColumns(FromList fromListParam) throws StandardException
fromListParam
- FromList to use/append to.StandardException
- Thrown on errorvoid bindResultColumns(TableDescriptor targetTableDescriptor, FromVTI targetVTI, ResultColumnList targetColumnList, DMLStatementNode statement, FromList fromListParam) throws StandardException
targetTableDescriptor
- The TableDescriptor for the table being
updated or inserted intotargetColumnList
- For INSERT statements, the user
does not have to supply column
names (for example, "insert into t
values (1,2,3)". When this
parameter is null, it means that
the user did not supply column
names, and so the binding should
be done based on order. When it
is not null, it means do the binding
by name, not position.statement
- Calling DMLStatementNode (Insert or Update)fromListParam
- FromList to use/append to.StandardException
- Thrown on errorvoid bindUntypedNullsToResultColumns(ResultColumnList rcl) throws StandardException
rcl
- The ResultColumnList with the types to bind nulls toStandardException
- Thrown on errorResultSetNode preprocess(int numTables, GroupByList gbl, FromList fromList) throws StandardException
numTables
- The number of tables in the DML Statementgbl
- The group by list, if anyfromList
- The from list, if anyStandardException
- Thrown on errorvoid projectResultColumns() throws StandardException
StandardException
ResultSetNode ensurePredicateList(int numTables) throws StandardException
numTables
- The number of tables in the query.StandardException
- Thrown on errorResultSetNode addNewPredicate(Predicate predicate) throws StandardException
predicate
- The predicate to addStandardException
- Thrown on errorboolean flattenableInFromSubquery(FromList fromList)
fromList
- The outer from listResultSetNode genProjectRestrictForReordering() throws StandardException
StandardException
- Thrown on errorResultSetNode optimize(DataDictionary dataDictionary, PredicateList predicates, double outerRows) throws StandardException
dataDictionary
- The DataDictionary to use for optimizationpredicates
- The PredicateList to apply.outerRows
- The number of outer joining rowsStandardException
- Thrown on errorResultSetNode modifyAccessPaths() throws StandardException
StandardException
- Thrown on errorResultSetNode modifyAccessPaths(PredicateList predList) throws StandardException
predList
- A list of optimizable predicates that should
be pushed to this ResultSetNode, as determined by optimizer.StandardException
- Thrown on errorResultColumnDescriptor[] makeResultDescriptors()
boolean columnTypesAndLengthsMatch() throws StandardException
StandardException
void setResultColumns(ResultColumnList newRCL)
newRCL
- The new ResultColumnList for this ResultSetNodeResultColumnList getResultColumns()
void setReferencedTableMap(JBitSet newRTM)
newRTM
- The new referencedTableMap for this ResultSetNodepublic JBitSet getReferencedTableMap()
void fillInReferencedTableMap(JBitSet passedMap)
passedMap
- The table map to fill in.void rejectParameters() throws StandardException
StandardException
- Thrown if a ? parameter found
directly under a ResultColumnvoid rejectXMLValues() throws StandardException
StandardException
- Thrown if an XML value found
directly under a ResultColumnvoid renameGeneratedResultNames() throws StandardException
StandardException
void markStatementResultSet()
ResultSetNode enhanceRCLForInsert(InsertNode target, boolean inOrder, int[] colMap) throws StandardException
target
- the target node for the insertinOrder
- are source cols in same order as target cols?colMap
- int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1)StandardException
- Thrown on errorResultColumnList getRCLForInsert(InsertNode target, int[] colMap) throws StandardException
target
- the target node for the insertcolMap
- int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1)StandardException
private ResultColumn genNewRCForInsert(TableDescriptor targetTD, FromVTI targetVTI, int columnNumber, DataDictionary dataDictionary) throws StandardException
targetTD
- Target TableDescriptor if the target is not a VTI, null if a VTI.targetVTI
- Target description if it is a VTI, null if not a VTIcolumnNumber
- The column numberdataDictionary
- The DataDictionaryStandardException
- Thrown on errorprivate ResultSetNode generateProjectRestrictForInsert(InsertNode target, int[] colMap) throws StandardException
target
- the target node for the insertcolMap
- int array representation of correspondence between
RCLs - colmap[i] = -1 -> missing in current RCL
colmap[i] = j -> targetRCL(i) <-> thisRCL(j+1)StandardException
private ResultColumn createGeneratedColumn(TableDescriptor targetTD, ColumnDescriptor colDesc) throws StandardException
StandardException
public ValueNode parseDefault(java.lang.String defaultText) throws StandardException
defaultText
- Text of Default.StandardException
- Thrown on failurepublic ResultDescription makeResultDescription()
boolean isUpdatableCursor(DataDictionary dd) throws StandardException
StandardException
- Thrown on errorFromTable getCursorTargetTable()
boolean markAsCursorTargetTable()
void notCursorTargetTable()
ResultSetNode genProjectRestrict() throws StandardException
StandardException
- Thrown on errorResultSetNode genProjectRestrict(int numTables) throws StandardException
numTables
- Number of tables in the DML StatementStandardException
- Thrown on errorvoid generateNormalizationResultSet(ActivationClassBuilder acb, MethodBuilder mb, int resultSetNumber, ResultDescription resultDescription) throws StandardException
acb
- The ActivationClassBuildermb
- The method to put the generated code inresultSetNumber
- The result set number for the NRSresultDescription
- The ERD for the ResultSetStandardException
- Thrown on errorResultSetNode changeAccessPath() throws StandardException
StandardException
- Thrown on errorboolean referencesTarget(java.lang.String name, boolean baseTable) throws StandardException
name
- Table name (String) to search for.baseTable
- Whether or not name is for a base tableStandardException
- Thrown on errorboolean subqueryReferencesTarget(java.lang.String name, boolean baseTable) throws StandardException
name
- The table name.StandardException
- Thrown on errorboolean isOneRowResultSet() throws StandardException
StandardException
- Thrown on errorboolean isNotExists()
protected OptimizerImpl getOptimizerImpl()
Optimizer getOptimizer()
void setOptimizer(Optimizer opt)
protected CostEstimate getNewCostEstimate() throws StandardException
StandardException
- Thrown on errorvoid acceptChildren(Visitor v) throws StandardException
acceptChildren
in class QueryTreeNode
v
- the visitorStandardException
- on errorResultSetNode considerMaterialization(JBitSet outerTables) throws StandardException
StandardException
- Thrown on errorboolean performMaterialization(JBitSet outerTables) throws StandardException
StandardException
- Thrown on errorFromTable getFromTableByName(java.lang.String name, java.lang.String schemaName, boolean exactMatch) throws StandardException
name
- 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 errorabstract void decrementLevel(int decrement)
decrement
- The amount to decrement by.void pushOrderByList(OrderByList orderByList)
pushQueryExpressionSuffix()
.orderByList
- The order by listvoid pushOffsetFetchFirst(ValueNode offset, ValueNode fetchFirst, boolean hasJDBClimitClause)
pushQueryExpressionSuffix()
.offset
- the OFFSET, if anyfetchFirst
- the OFFSET FIRST, if anyhasJDBClimitClause
- true if the clauses were added by (and have the semantics of) a JDBC limit clausevoid generateResultSet(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
acb
- The ExpressionClassBuilder for the class being builtmb
- The method the expression will go intoStandardException
- Thrown on errorint updateTargetLockMode()
TransactionController
void notFlattenableJoin()
boolean isOrderedOn(ColumnReference[] crs, boolean permuteOrdering, java.util.List<FromBaseTable> fbtHolder) throws StandardException
crs
- The specified ColumnReference[]permuteOrdering
- Whether or not the order of the CRs in the array can be permutedfbtHolder
- List that is to be filled with the FromBaseTableStandardException
- Thrown on errorboolean returnsAtMostOneRow()
void replaceOrForbidDefaults(TableDescriptor ttd, ResultColumnList tcl, boolean allowDefaults) throws StandardException
ttd
- The TableDescriptor for the target table.tcl
- The RCL for the target table.allowDefaults
- true if allowedStandardException
- Thrown on errorboolean isPossibleDistinctScan(java.util.Set<BaseColumnNode> distinctColumns)
distinctColumns
- the set of distinct columnsvoid markForDistinctScan()
void adjustForSortElimination()
void adjustForSortElimination(RequiredRowOrdering rowOrdering) throws StandardException
StandardException
static int numDistinctAggregates(java.util.List<AggregateNode> aggregates)
JBitSet LOJgetReferencedTables(int numTables) throws StandardException
StandardException
void pushQueryExpressionSuffix()
ResultSetNode.QueryExpressionClauses
.
Overridden by implementors of pushOrderByNode, pushOffsetFetchFirst.void printQueryExpressionSuffixClauses(int depth, ResultSetNode.QueryExpressionClauses qec)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.