Github user comnetwork commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/314#discussion_r206014266
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java ---
@@ -559,8 +559,16 @@ protected QueryPlan
compileSingleFlatQuery(StatementContext context, SelectState
groupBy = groupBy.compile(context, innerPlanTupleProjector);
context.setResolver(resolver); // recover resolver
RowProjector projector = ProjectionCompiler.compile(context,
select, groupBy, asSubquery ? Collections.<PDatum>emptyList() : targetColumns,
where);
- OrderBy orderBy = OrderByCompiler.compile(context, select,
groupBy, limit, offset, projector,
- groupBy == GroupBy.EMPTY_GROUP_BY ?
innerPlanTupleProjector : null, isInRowKeyOrder);
+ OrderBy orderBy = OrderByCompiler.compile(
+ context,
+ select,
+ groupBy,
+ limit,
+ offset,
+ projector,
+ groupBy == GroupBy.EMPTY_GROUP_BY ?
innerPlanTupleProjector : null,
+ groupBy == GroupBy.EMPTY_GROUP_BY ? isInRowKeyOrder : true,
+ where);
--- End diff --
Yes, it is a nice suggestion, I would make a modification
---