diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java index 56eb2240c3..0029ea5a3f 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java @@ -2142,7 +2142,7 @@ final class SelectQueryImpl extends AbstractResultQuery imp private final Field limitWindowFunction(Context c) { return distinct - ? DSL.denseRank().over(orderBy(getNonEmptyOrderByForDistinct(c.configuration()))) + ? DSL.denseRank().over(orderBy(getNonEmptyOrderBy(c.configuration()))) : getLimit().withTies() ? DSL.rank().over(orderBy(getNonEmptyOrderBy(c.configuration()))) : DSL.rowNumber().over(orderBy(getNonEmptyOrderBy(c.configuration()))); @@ -4440,16 +4440,6 @@ final class SelectQueryImpl extends AbstractResultQuery imp return getOrderBy(); } - final SortFieldList getNonEmptyOrderByForDistinct(Configuration configuration) { - SortFieldList order = new SortFieldList(); - order.addAll(getNonEmptyOrderBy(configuration)); - - for (Field field : getSelect()) - order.add(field.asc()); - - return order; - } - @Override public final void addOrderBy(Collection> fields) { getOrderBy().addAll(Tools.sortFields(fields));