Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 c804aa825 -> afe4d75cb


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/afe4d75c
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/afe4d75c
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/afe4d75c

Branch: refs/heads/4.x-HBase-0.98
Commit: afe4d75cb9286ab766be19abccbf5b84bb573904
Parents: c804aa8
Author: maryannxue <[email protected]>
Authored: Fri Oct 23 13:47:58 2015 -0400
Committer: maryannxue <[email protected]>
Committed: Fri Oct 23 13:47:58 2015 -0400

----------------------------------------------------------------------
 .../src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java  | 2 ++
 .../src/main/java/org/apache/phoenix/compile/QueryCompiler.java | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/afe4d75c/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 e8ed99d..7a9f46c 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
@@ -101,6 +101,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[][] {
@@ -116,6 +117,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/afe4d75c/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 f14d808..ec582a2 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);
-        
-        return compileSingleFlatQuery(context, select, binds, asSubquery, 
allowPageFilter, innerPlan, tupleProjector, 
innerPlan.getOrderBy().getOrderByExpressions().isEmpty());
+        boolean isInRowKeyOrder = innerPlan.getGroupBy() == 
GroupBy.EMPTY_GROUP_BY && innerPlan.getOrderBy() == OrderBy.EMPTY_ORDER_BY;
+
+        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{

Reply via email to