Apache-Phoenix | 4.x-HBase-1.0 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-1.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.0

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastCompletedBuild/testReport/

Changes
[ssa] PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Apache-Phoenix | 4.x-HBase-0.98 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-0.98

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastCompletedBuild/testReport/

Changes
[ssa] PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Jenkins build is back to normal : Phoenix-4.x-HBase-1.1 #155

2016-08-06 Thread Apache Jenkins Server
See 



Jenkins build is back to normal : Phoenix | Master #1358

2016-08-06 Thread Apache Jenkins Server
See 



[2/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/52785b4a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/52785b4a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/52785b4a

Branch: refs/heads/4.8-HBase-0.98
Commit: 52785b4a91ff701350ac79873d8246e28fbb52ae
Parents: 617476a
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:44:23 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/52785b4a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[4/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/e151e615
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e151e615
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e151e615

Branch: refs/heads/4.8-HBase-1.1
Commit: e151e6159c2d5402b9aa9b551a58f4c9fee522a6
Parents: 444a4eb
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:44:50 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e151e615/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[7/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/62d45662
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/62d45662
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/62d45662

Branch: refs/heads/4.x-HBase-1.0
Commit: 62d45662be555701a0ca66ea5eb5d920b4b15e04
Parents: 6198bf7
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:46:23 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/62d45662/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[8/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2308ba94
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2308ba94
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2308ba94

Branch: refs/heads/4.x-HBase-1.1
Commit: 2308ba94d437a469ebc29ce9039c68fdd1cd5301
Parents: 2225282
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:46:29 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2308ba94/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[6/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b8e65d0d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b8e65d0d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b8e65d0d

Branch: refs/heads/4.x-HBase-0.98
Commit: b8e65d0d1ac5aa39ac70e463ec774825ce53f568
Parents: 71728df
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:45:22 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b8e65d0d/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[5/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/e47eceb0
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/e47eceb0
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/e47eceb0

Branch: refs/heads/4.8-HBase-1.2
Commit: e47eceb0f8f079054b61f0161d4a7e1b4df6bbd6
Parents: eca43d9
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:45:08 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e47eceb0/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[1/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-0.98 617476a79 -> 52785b4a9
  refs/heads/4.8-HBase-1.0 d515fbc9e -> 3c0499533
  refs/heads/4.8-HBase-1.1 444a4eb0d -> e151e6159
  refs/heads/4.8-HBase-1.2 eca43d98c -> e47eceb0f
  refs/heads/4.x-HBase-0.98 71728dfc5 -> b8e65d0d1
  refs/heads/4.x-HBase-1.0 6198bf7b4 -> 62d45662b
  refs/heads/4.x-HBase-1.1 2225282e8 -> 2308ba94d
  refs/heads/master 67b8b7363 -> bb0d89bd9


PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bb0d89bd
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bb0d89bd
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bb0d89bd

Branch: refs/heads/master
Commit: bb0d89bd9f591e056f7ae9cd5892b9f99bd513a6
Parents: 67b8b73
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:44:00 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bb0d89bd/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



[3/8] phoenix git commit: PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause IllegalArgumentException

2016-08-06 Thread ssa
PHOENIX-3152 Incorrect comparator in QueryOptimizer may cause 
IllegalArgumentException


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/3c049953
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/3c049953
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/3c049953

Branch: refs/heads/4.8-HBase-1.0
Commit: 3c04995337d428f143b6a517a7ea8b273a0590f3
Parents: d515fbc
Author: Sergey Soldatov 
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov 
Committed: Sat Aug 6 19:44:31 2016 -0700

--
 .../apache/phoenix/optimize/QueryOptimizer.java | 21 +++-
 1 file changed, 12 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3c049953/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
index e4198ee..bd9c811 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java
@@ -383,35 +383,38 @@ public class QueryOptimizer {
 // For shared indexes (i.e. indexes on views and local 
indexes),
 // a) add back any view constants as these won't be in the 
index, and
 // b) ignore the viewIndexId which will be part of the row key 
columns.
-int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) - 
+int c = 
(plan2.getContext().getScanRanges().getBoundPkColumnCount() + 
(table2.getViewIndexId() == null ? 0 : (boundRanges - 1))) -
 
(plan1.getContext().getScanRanges().getBoundPkColumnCount() + 
(table1.getViewIndexId() == null ? 0 : (boundRanges - 1)));
 if (c != 0) return c;
-if (plan1.getGroupBy()!=null && plan2.getGroupBy()!=null) {
+if (plan1.getGroupBy() != null && plan2.getGroupBy() != null) {
 if (plan1.getGroupBy().isOrderPreserving() != 
plan2.getGroupBy().isOrderPreserving()) {
 return plan1.getGroupBy().isOrderPreserving() ? -1 : 1;
-} 
+}
 }
 // Use smaller table (table with fewest kv columns)
 c = (table1.getColumns().size() - 
table1.getPKColumns().size()) - (table2.getColumns().size() - 
table2.getPKColumns().size());
 if (c != 0) return c;
-
+
 // If all things are equal, don't choose local index as it 
forces scan
 // on every region (unless there's no start/stop key)
-if (table1.getIndexType() == IndexType.LOCAL) {
+
+if (table1.getIndexType() == IndexType.LOCAL && 
table2.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan1.getContext().getScanRanges().getRanges().isEmpty() ? -1 : 1;
 }
-if (table2.getIndexType() == IndexType.LOCAL) {
+if (table2.getIndexType() == IndexType.LOCAL && 
table1.getIndexType() !=
+IndexType.LOCAL) {
 return 
plan2.getContext().getScanRanges().getRanges().isEmpty() ? 1 : -1;
 }
 
 // All things being equal, just use the table based on the 
Hint.USE_DATA_OVER_INDEX_TABLE
-if (table1.getType() == PTableType.INDEX) {
+
+if (table1.getType() == PTableType.INDEX && table2.getType() 
!= PTableType.INDEX) {
 return comparisonOfDataVersusIndexTable;
 }
-if (table2.getType() == PTableType.INDEX) {
+if (table2.getType() == PTableType.INDEX && table1.getType() 
!= PTableType.INDEX) {
 return -comparisonOfDataVersusIndexTable;
 }
-
 return 0;
 }
 



Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #154

2016-08-06 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after

--
[...truncated 2105 lines...]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.007 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.AsyncImmutableIndexIT
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT  Time elapsed: 0.006 sec 
 <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)

Running org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.005 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT  Time elapsed: 0.004 
sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)

Running org.apache.phoenix.end2end.index.MutableIndexFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexFailureIT
org.apache.phoenix.end2end.index.MutableIndexFailureIT  Time elapsed: 0.005 sec 
 <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)

Running org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT
Running org.apache.phoenix.end2end.index.MutableIndexReplicationIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexReplicationIT
org.apache.phoenix.end2end.index.MutableIndexReplicationIT  Time elapsed: 0.005 
sec  <<< ERROR!
java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)

Running org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.019 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT  Time elapsed: 0.019 
sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)

Running org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT  Time elapsed: 0.005 sec  
<<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT.doSetup(TxWriteFailureIT.java:86)
Caused by: 

Build failed in Jenkins: Phoenix | Master #1357

2016-08-06 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after

--
[...truncated 2337 lines...]
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

Sun Aug 07 00:44:57 UTC 2016, RpcRetryingCaller{globalStartTime=1470530428330, 
pause=100, retries=35}, org.apache.hadoop.hbase.NotServingRegionException: 
org.apache.hadoop.hbase.NotServingRegionException: Region 
SYSTEM.CATALOG,,1470529869880.7cd5eb998656912252a3342686a329ec. is not online 
on pomona.apache.org,49350,1470529842320
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2911)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1053)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1969)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33652)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

Sun Aug 07 00:45:17 UTC 2016, RpcRetryingCaller{globalStartTime=1470530428330, 
pause=100, retries=35}, org.apache.hadoop.hbase.NotServingRegionException: 
org.apache.hadoop.hbase.NotServingRegionException: Region 
SYSTEM.CATALOG,,1470529869880.7cd5eb998656912252a3342686a329ec. is not online 
on pomona.apache.org,49350,1470529842320
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2911)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1053)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1969)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33652)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

Sun Aug 07 00:45:37 UTC 2016, RpcRetryingCaller{globalStartTime=1470530428330, 
pause=100, retries=35}, org.apache.hadoop.hbase.NotServingRegionException: 
org.apache.hadoop.hbase.NotServingRegionException: Region 
SYSTEM.CATALOG,,1470529869880.7cd5eb998656912252a3342686a329ec. is not online 
on pomona.apache.org,49350,1470529842320
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2911)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1053)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1969)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33652)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

Sun Aug 07 00:45:57 UTC 2016, RpcRetryingCaller{globalStartTime=1470530428330, 
pause=100, retries=35}, org.apache.hadoop.hbase.NotServingRegionException: 
org.apache.hadoop.hbase.NotServingRegionException: Region 
SYSTEM.CATALOG,,1470529869880.7cd5eb998656912252a3342686a329ec. is not online 
on pomona.apache.org,49350,1470529842320
at 
org.apache.hadoop.hbase.regionserver.HRegionServer.getRegionByEncodedName(HRegionServer.java:2911)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.getRegion(RSRpcServices.java:1053)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.execService(RSRpcServices.java:1969)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:33652)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2170)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:109)
at 
org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
at java.lang.Thread.run(Thread.java:745)

Sun Aug 07 

Apache-Phoenix | 4.x-HBase-0.98 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-0.98

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Apache-Phoenix | 4.x-HBase-1.0 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-1.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.0

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/master 60b95f962 -> 67b8b7363


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/67b8b736
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/67b8b736
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/67b8b736

Branch: refs/heads/master
Commit: 67b8b73630676b2f75ff05eed194faf9b7e856ca
Parents: 60b95f9
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:29:46 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/67b8b736/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/67b8b736/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.2 abd7feb24 -> eca43d98c


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/eca43d98
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/eca43d98
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/eca43d98

Branch: refs/heads/4.8-HBase-1.2
Commit: eca43d98c5eb8b9180c30a22773db8943a4ee03e
Parents: abd7feb
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:29:32 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/eca43d98/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/eca43d98/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.1 f00d0ade1 -> 444a4eb0d


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/444a4eb0
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/444a4eb0
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/444a4eb0

Branch: refs/heads/4.8-HBase-1.1
Commit: 444a4eb0dacd7030c725070b9fb96ae454651c1b
Parents: f00d0ad
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:29:22 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/444a4eb0/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/444a4eb0/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.0 e533cbf42 -> d515fbc9e


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d515fbc9
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d515fbc9
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d515fbc9

Branch: refs/heads/4.8-HBase-1.0
Commit: d515fbc9ee3749760e329eaeb80e3272748c8061
Parents: e533cbf
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:29:12 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d515fbc9/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d515fbc9/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-0.98 3400bd634 -> 617476a79


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/617476a7
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/617476a7
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/617476a7

Branch: refs/heads/4.8-HBase-0.98
Commit: 617476a79219787f52a90fc50829d85adf34929b
Parents: 3400bd6
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:29:01 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/617476a7/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/617476a7/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 9037ff30c -> 2225282e8


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/2225282e
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/2225282e
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/2225282e

Branch: refs/heads/4.x-HBase-1.1
Commit: 2225282e8f4dcf066388cc07ecd3fb2b590e153e
Parents: 9037ff3
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:28:34 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/2225282e/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/2225282e/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 503fba67d -> 6198bf7b4


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6198bf7b
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6198bf7b
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6198bf7b

Branch: refs/heads/4.x-HBase-1.0
Commit: 6198bf7b43fb522319cffb44d4237756cc4834f3
Parents: 503fba6
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:28:05 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6198bf7b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6198bf7b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.

2016-08-06 Thread larsh
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 e3690cb7d -> 71728dfc5


PHOENIX-3158 COUNT(DISTINCT) may return null instead of 0 after PHOENIX-258.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/71728dfc
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/71728dfc
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/71728dfc

Branch: refs/heads/4.x-HBase-0.98
Commit: 71728dfc5bad3bcc473986cbfd0ed5e7a8c0b38c
Parents: e3690cb
Author: Lars Hofhansl 
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl 
Committed: Sat Aug 6 16:27:32 2016 -0700

--
 .../it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 2 ++
 .../src/main/java/org/apache/phoenix/execute/AggregatePlan.java| 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/71728dfc/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
index 1a0e4e1..e8e9e07 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DistinctPrefixFilterIT.java
@@ -290,6 +290,8 @@ public class DistinctPrefixFilterIT extends 
BaseHBaseManagedTimeTableReuseIT {
 
 testCount("SELECT %s COUNT(DISTINCT col1) FROM " + testTable, -1);
 testCount("SELECT %s COUNT(DISTINCT col2) FROM " + testTable, -1);
+
+testCount("SELECT %s COUNT(DISTINCT prefix1) FROM " + testTable + " 
WHERE col1 < 0", -1);
 }
 
 @Test

http://git-wip-us.apache.org/repos/asf/phoenix/blob/71728dfc/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java 
b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
index 136379d..00d478a 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/execute/AggregatePlan.java
@@ -223,7 +223,7 @@ public class AggregatePlan extends BaseQueryPlan {
 
 AggregatingResultIterator aggResultIterator;
 // No need to merge sort for ungrouped aggregation
-if (groupBy.isEmpty()) {
+if (groupBy.isEmpty() || groupBy.isUngroupedAggregate()) {
 aggResultIterator = new UngroupedAggregatingResultIterator(new 
ConcatResultIterator(iterators), aggregators);
 // If salted or local index we still need a merge sort as we'll 
potentially have multiple group by keys that aren't contiguous.
 } else if (groupBy.isOrderPreserving() && 
!(this.getTableRef().getTable().getBucketNum() != null || 
this.getTableRef().getTable().getIndexType() == IndexType.LOCAL)) {



Build failed in Jenkins: Phoenix-4.x-HBase-1.1 #153

2016-08-06 Thread Apache Jenkins Server
See 

Changes:

[larsh] PHOENIX-3156 DistinctPrefixFilter optimization produces incorrect

--
[...truncated 2106 lines...]
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.AsyncImmutableIndexIT
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT  Time elapsed: 0.008 sec 
 <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.AsyncImmutableIndexIT.doSetup(AsyncImmutableIndexIT.java:52)

Running org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.009 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT  Time elapsed: 0.008 
sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.ImmutableIndexWithStatsIT.doSetup(ImmutableIndexWithStatsIT.java:52)

Running org.apache.phoenix.end2end.index.MutableIndexFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.005 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexFailureIT
org.apache.phoenix.end2end.index.MutableIndexFailureIT  Time elapsed: 0.004 sec 
 <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.doSetup(MutableIndexFailureIT.java:115)

Running org.apache.phoenix.hbase.index.FailForUnsupportedHBaseVersionsIT
Running org.apache.phoenix.end2end.index.MutableIndexReplicationIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.MutableIndexReplicationIT
org.apache.phoenix.end2end.index.MutableIndexReplicationIT  Time elapsed: 0.003 
sec  <<< ERROR!
java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setupConfigsAndStartCluster(MutableIndexReplicationIT.java:170)
at 
org.apache.phoenix.end2end.index.MutableIndexReplicationIT.setUpBeforeClass(MutableIndexReplicationIT.java:108)

Running org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT  Time elapsed: 0.005 
sec  <<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)
Caused by: java.lang.RuntimeException: Master not initialized after 20ms 
seconds
at 
org.apache.phoenix.end2end.index.ReadOnlyIndexFailureIT.doSetup(ReadOnlyIndexFailureIT.java:119)

Running org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< 
FAILURE! - in org.apache.phoenix.end2end.index.txn.TxWriteFailureIT
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT  Time elapsed: 0.004 sec  
<<< ERROR!
java.lang.RuntimeException: java.io.IOException: Shutting down
at 
org.apache.phoenix.end2end.index.txn.TxWriteFailureIT.doSetup(TxWriteFailureIT.java:86)
Caused by: 

Jenkins build is back to normal : Phoenix | Master #1356

2016-08-06 Thread Apache Jenkins Server
See 



Apache-Phoenix | 4.x-HBase-0.98 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-0.98

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3156 DistinctPrefixFilter optimization produces incorrect



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout


Apache-Phoenix | 4.x-HBase-1.0 | Build Successful

2016-08-06 Thread Apache Jenkins Server
4.x-HBase-1.0 branch build status Successful

Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/4.x-HBase-1.0

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.x-HBase-1.0/lastCompletedBuild/testReport/

Changes
[larsh] PHOENIX-3156 DistinctPrefixFilter optimization produces incorrect



Build times for last couple of runsLatest build time is the right most | Legend blue: normal, red: test failure, gray: timeout