提交 520d0657 authored 作者: Thomas Mueller's avatar Thomas Mueller

Formatting

上级 e13d98a3
...@@ -34,7 +34,7 @@ import org.h2.result.ResultInterface; ...@@ -34,7 +34,7 @@ import org.h2.result.ResultInterface;
import org.h2.result.ResultTarget; import org.h2.result.ResultTarget;
import org.h2.result.Row; import org.h2.result.Row;
import org.h2.result.SearchRow; import org.h2.result.SearchRow;
import org.h2.result.SortOrder; import org.h2.result.SortOrder;
import org.h2.table.Column; import org.h2.table.Column;
import org.h2.table.ColumnResolver; import org.h2.table.ColumnResolver;
import org.h2.table.IndexColumn; import org.h2.table.IndexColumn;
...@@ -480,20 +480,19 @@ public class Select extends Query { ...@@ -480,20 +480,19 @@ public class Select extends Query {
/** /**
* Validates the cases where ORDER BY clause do not contains all indexed * Validates the cases where ORDER BY clause do not contains all indexed
* columns, but the related index path still would be valid for such search. * columns, but the related index path still would be valid for such search.
* Sometimes, the absence of a column in the ORDER BY clause does not alter the * Sometimes, the absence of a column in the ORDER BY clause does not alter
* expected final result, and an index sorted scan could still be used. * the expected final result, and an index sorted scan could still be used.
* <pre> * <pre>
* CREATE TABLE test(a, b); * CREATE TABLE test(a, b);
* CREATE UNIQUE INDEX idx_test ON test(a, b); * CREATE UNIQUE INDEX idx_test ON test(a, b);
* SELECT b FROM test WHERE a=22 AND b>10 order by b; * SELECT b FROM test WHERE a=22 AND b>10 order by b;
* </pre> * </pre>
* More restrictive rule where one table query with indexed column * More restrictive rule where one table query with indexed column not
* not present in the ORDER BY clause is filtered with equality conditions * present in the ORDER BY clause is filtered with equality conditions (at
* (at least one) of type COLUMN = CONSTANT in a conjunctive fashion. * least one) of type COLUMN = CONSTANT in a conjunctive fashion.
* *
* @param sortColumn Column to be validated * @param sortColumn Column to be validated
* @return true if the column can be used implicitly, or false * @return true if the column can be used implicitly, or false otherwise.
* otherwise.
*/ */
private boolean isSortColumnImplicit(TableFilter tableFilter, private boolean isSortColumnImplicit(TableFilter tableFilter,
Column sortColumn) { Column sortColumn) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论