| org.apache.derby.iapi.sql.compile.RequiredRowOrdering
All known Subclasses: org.apache.derby.impl.sql.compile.OrderByList,
RequiredRowOrdering | public interface RequiredRowOrdering (Code) | | 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.
|
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) Tell whether sorting is required for this RequiredRowOrdering,
given a RowOrdering.
Parameters: rowOrdering - The order of rows in question SORT_REQUIRED if sorting is required,ELIMINATE_DUPS if no sorting is required but duplicatesmust be eliminated (i.e. | int | sortRequired(RowOrdering rowOrdering, JBitSet tableMap) 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.
This is useful for reducing the number of cases the optimizer
has to consider.
Parameters: rowOrdering - The order of rows in the partial join order Parameters: tableMap - A bit map of the tables in the partial join order SORT_REQUIRED if sorting is required,ELIMINATE_DUPS if no sorting is required by duplicatesmust be eliminated (i.e. |
ELIMINATE_DUPS | final static int ELIMINATE_DUPS(Code) | | |
NOTHING_REQUIRED | final static int NOTHING_REQUIRED(Code) | | |
SORT_REQUIRED | final static int SORT_REQUIRED(Code) | | |
estimateCost | void estimateCost(double estimatedInputRows, RowOrdering rowOrdering, CostEstimate resultCost) throws StandardException(Code) | | Estimate the cost of doing a sort for this row ordering, given
the number of rows to be sorted. This does not take into account
whether the sort is really needed. It also estimates the number of
result rows.
Parameters: estimatedInputRows - The estimated number of rows to sort Parameters: rowOrdering - The ordering of the input rows Parameters: resultCost - A place to store the resulting cost exception: StandardException - Thrown on error |
getSortNeeded | boolean getSortNeeded()(Code) | | |
sortNeeded | void sortNeeded()(Code) | | Indicate that a sort is necessary to fulfill this required ordering.
This method may be called many times during a single optimization.
|
sortNotNeeded | void sortNotNeeded()(Code) | | Indicate that a sort is *NOT* necessary to fulfill this required
ordering. This method may be called many times during a single
optimization.
|
sortRequired | int sortRequired(RowOrdering rowOrdering) throws StandardException(Code) | | Tell whether sorting is required for this RequiredRowOrdering,
given a RowOrdering.
Parameters: rowOrdering - The order of rows in question SORT_REQUIRED if sorting is required,ELIMINATE_DUPS if no sorting is required but duplicatesmust be eliminated (i.e. the rows are inthe right order but there may be duplicates),NOTHING_REQUIRED is no operation is required exception: StandardException - Thrown on error |
sortRequired | int sortRequired(RowOrdering rowOrdering, JBitSet tableMap) throws StandardException(Code) | | 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.
This is useful for reducing the number of cases the optimizer
has to consider.
Parameters: rowOrdering - The order of rows in the partial join order Parameters: tableMap - A bit map of the tables in the partial join order SORT_REQUIRED if sorting is required,ELIMINATE_DUPS if no sorting is required by duplicatesmust be eliminated (i.e. the rows are inthe right order but there may be duplicates),NOTHING_REQUIRED is no operation is required exception: StandardException - Thrown on error |
|
|