OrderByList
public interface RequiredRowOrdering
Modifier and Type | Field | Description |
---|---|---|
static int |
ELIMINATE_DUPS |
|
static int |
NOTHING_REQUIRED |
|
static int |
SORT_REQUIRED |
Modifier and Type | Method | Description |
---|---|---|
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,
OptimizableList optimizableList,
int[] proposedJoinOrder) |
Tell whether sorting is required for this RequiredRowOrdering,
given a RowOrdering.
|
int |
sortRequired(RowOrdering rowOrdering,
JBitSet tableMap,
OptimizableList optimizableList,
int[] proposedJoinOrder) |
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.
|
static final int SORT_REQUIRED
static final int ELIMINATE_DUPS
static final int NOTHING_REQUIRED
int sortRequired(RowOrdering rowOrdering, OptimizableList optimizableList, int[] proposedJoinOrder) throws StandardException
rowOrdering
- The order of rows in questionoptimizableList
- The list of join participantsproposedJoinOrder
- The current join order being considered by
the optimizer. We need to look into this to determine if the outer
optimizables are single row result set if the order by column is
on an inner optimizable and that inner optimizable is not a one.
proposedJoinOrder
is a map onto optimizableList
:
it contains indexes of optimizables in that list in the join order
proposed, cf. OptimizerImpl#proposedJoinOrder
.StandardException
- Thrown on errorint sortRequired(RowOrdering rowOrdering, JBitSet tableMap, OptimizableList optimizableList, int[] proposedJoinOrder) throws StandardException
rowOrdering
- The order of rows in the partial join ordertableMap
- A bit map of the tables in the partial join orderoptimizableList
- The list of join participantsproposedJoinOrder
- The current join order being considered by
the optimizer. We need to look into this to determine if the outer
optimizables are single row result set if the order by column is
on an inner optimizable and that inner optimizable is not a one.
proposedJoinOrder
is a map onto optimizableList
:
it contains indexes of optimizables in that list in the join order
proposed, cf. OptimizerImpl#proposedJoinOrder
.
DERBY-3926 and DERBY-6148StandardException
- 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 costStandardException
- Thrown on errorvoid sortNeeded()
void sortNotNeeded()
boolean getSortNeeded()
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.