|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RequiredRowOrdering
This interface provides a representation of the required ordering of rows from a ResultSet. Different operations can require ordering: ORDER BY, DISTINCT, GROUP BY. Some operations, like ORDER BY, require that the columns be ordered a particular way, while others, like DISTINCT and GROUP BY, reuire only that there be no duplicates in the result.
Field Summary | |
---|---|
static int |
ELIMINATE_DUPS
|
static int |
NOTHING_REQUIRED
|
static int |
SORT_REQUIRED
|
Method Summary | |
---|---|
void |
estimateCost(double estimatedInputRows,
RowOrdering rowOrdering,
CostEstimate resultCost)
Estimate the cost of doing a sort for this row ordering, given the number of rows to be sorted. |
boolean |
getSortNeeded()
|
void |
sortNeeded()
Indicate that a sort is necessary to fulfill this required ordering. |
void |
sortNotNeeded()
Indicate that a sort is *NOT* necessary to fulfill this required ordering. |
int |
sortRequired(RowOrdering rowOrdering,
JBitSet tableMap,
OptimizableList optimizableList)
Tell whether sorting is required for this RequiredRowOrdering, given a RowOrdering representing a partial join order, and a bit map telling what tables are represented in the join order. |
int |
sortRequired(RowOrdering rowOrdering,
OptimizableList optimizableList)
Tell whether sorting is required for this RequiredRowOrdering, given a RowOrdering. |
Field Detail |
---|
static final int SORT_REQUIRED
static final int ELIMINATE_DUPS
static final int NOTHING_REQUIRED
Method Detail |
---|
int sortRequired(RowOrdering rowOrdering, OptimizableList optimizableList) throws StandardException
rowOrdering
- The order of rows in questionoptimizableList
- The current join order being considered by
the optimizer. We need to look into this to determine if the outer
optimizables are single row resultset if the order by column is
on an inner optimizable and that inner optimizable is not a one
row resultset. DERBY-3926
StandardException
- Thrown on errorint sortRequired(RowOrdering rowOrdering, JBitSet tableMap, OptimizableList optimizableList) throws StandardException
rowOrdering
- The order of rows in the partial join ordertableMap
- A bit map of the tables in the partial join orderoptimizableList
- The current join order being considered by
the optimizer. We need to look into this to determine if the outer
optimizables are single row resultset if the order by column is
on an inner optimizable and that inner optimizable is not a one
row resultset. DERBY-3926
StandardException
- Thrown on errorvoid estimateCost(double estimatedInputRows, RowOrdering rowOrdering, CostEstimate resultCost) throws StandardException
estimatedInputRows
- The estimated number of rows to sortrowOrdering
- The ordering of the input rowsresultCost
- A place to store the resulting cost
StandardException
- Thrown on errorvoid sortNeeded()
void sortNotNeeded()
boolean getSortNeeded()
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |