Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 606983425 -> 267eb6bc7
PHOENIX-2257 Failing integration test in DerivedTableIT Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/267eb6bc Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/267eb6bc Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/267eb6bc Branch: refs/heads/4.x-HBase-1.0 Commit: 267eb6bc759977064be4df40aebda522a7f75b98 Parents: 6069834 Author: maryannxue <wei....@intel.com> Authored: Fri Oct 23 13:34:57 2015 -0400 Committer: maryannxue <wei....@intel.com> Committed: Fri Oct 23 13:34:57 2015 -0400 ---------------------------------------------------------------------- .../src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java | 2 ++ .../src/main/java/org/apache/phoenix/compile/QueryCompiler.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/267eb6bc/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java index b7c4906..7b21f37 100644 --- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java +++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java @@ -102,6 +102,7 @@ public class DerivedTableIT extends BaseClientManagedTimeIT { "CLIENT PARALLEL 1-WAY FULL SCAN OVER ATABLE_DERIVED_IDX\n" + " SERVER AGGREGATE INTO DISTINCT ROWS BY [\"A_STRING\", \"B_STRING\"]\n" + "CLIENT MERGE SORT\n" + + "CLIENT SORTED BY [A]\n" + "CLIENT AGGREGATE INTO DISTINCT ROWS BY [A]\n" + "CLIENT DISTINCT ON [COLLECTDISTINCT(B)]"}}); testCases.add(new String[][] { @@ -117,6 +118,7 @@ public class DerivedTableIT extends BaseClientManagedTimeIT { "CLIENT PARALLEL 4-WAY FULL SCAN OVER ATABLE\n" + " SERVER AGGREGATE INTO DISTINCT ROWS BY [A_STRING, B_STRING]\n" + "CLIENT MERGE SORT\n" + + "CLIENT SORTED BY [A]\n" + "CLIENT AGGREGATE INTO DISTINCT ROWS BY [A]\n" + "CLIENT DISTINCT ON [COLLECTDISTINCT(B)]"}}); return testCases; http://git-wip-us.apache.org/repos/asf/phoenix/blob/267eb6bc/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java index 4333539..8a9abc2 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/QueryCompiler.java @@ -500,8 +500,9 @@ public class QueryCompiler { context.setResolver(resolver); tableRef = resolver.getTables().get(0); context.setCurrentTable(tableRef); + boolean isInRowKeyOrder = innerPlan.getGroupBy() == GroupBy.EMPTY_GROUP_BY && innerPlan.getOrderBy() == OrderBy.EMPTY_ORDER_BY; - return compileSingleFlatQuery(context, select, binds, asSubquery, allowPageFilter, innerPlan, tupleProjector, innerPlan.getOrderBy().getOrderByExpressions().isEmpty()); + return compileSingleFlatQuery(context, select, binds, asSubquery, allowPageFilter, innerPlan, tupleProjector, isInRowKeyOrder); } protected QueryPlan compileSingleFlatQuery(StatementContext context, SelectStatement select, List<Object> binds, boolean asSubquery, boolean allowPageFilter, QueryPlan innerPlan, TupleProjector innerPlanTupleProjector, boolean isInRowKeyOrder) throws SQLException{