You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ss...@apache.org on 2017/02/20 01:38:11 UTC
[01/10] phoenix git commit: Set version to 4.9.0-HBase-1.0-SNAPSHOT
after release
Repository: phoenix
Updated Branches:
refs/heads/4.x-HBase-0.98 54ae6f3ac -> 280b32ad6
refs/heads/4.x-HBase-1.0 [created] 1da595b03
refs/heads/4.x-HBase-1.1 893bad336 -> 816840ba9
refs/heads/4.x-HBase-1.3 0099ec5e1 -> 6faccf1dc
refs/heads/master 130f29dc5 -> 275421bcd
Set version to 4.9.0-HBase-1.0-SNAPSHOT after release
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/89014bbc
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/89014bbc
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/89014bbc
Branch: refs/heads/4.x-HBase-1.0
Commit: 89014bbcfdecd6e5f0659563ba3a8e9d81261c12
Parents: 6fcb083
Author: Ankit Singhal <an...@gmail.com>
Authored: Thu Aug 4 16:56:03 2016 +0530
Committer: Ankit Singhal <an...@gmail.com>
Committed: Thu Aug 4 16:56:03 2016 +0530
----------------------------------------------------------------------
phoenix-assembly/pom.xml | 2 +-
phoenix-client/pom.xml | 2 +-
phoenix-core/pom.xml | 2 +-
phoenix-flume/pom.xml | 2 +-
phoenix-hive/pom.xml | 2 +-
phoenix-pherf/pom.xml | 2 +-
phoenix-pig/pom.xml | 2 +-
phoenix-queryserver-client/pom.xml | 2 +-
phoenix-queryserver/pom.xml | 2 +-
phoenix-server/pom.xml | 2 +-
phoenix-spark/pom.xml | 2 +-
phoenix-tracing-webapp/pom.xml | 2 +-
pom.xml | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-assembly/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-assembly/pom.xml b/phoenix-assembly/pom.xml
index 4412ad3..2238511 100644
--- a/phoenix-assembly/pom.xml
+++ b/phoenix-assembly/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-assembly</artifactId>
<name>Phoenix Assembly</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-client/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-client/pom.xml b/phoenix-client/pom.xml
index e1f171e..d7e6f05 100644
--- a/phoenix-client/pom.xml
+++ b/phoenix-client/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-client</artifactId>
<name>Phoenix Client</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-core/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index f630169..6fa42bc 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-core</artifactId>
<name>Phoenix Core</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-flume/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-flume/pom.xml b/phoenix-flume/pom.xml
index 82d3719..2c1ff96 100644
--- a/phoenix-flume/pom.xml
+++ b/phoenix-flume/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-flume</artifactId>
<name>Phoenix - Flume</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-hive/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index c1c8cd0..a8db2d0 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-hive</artifactId>
<name>Phoenix - Hive</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-pherf/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-pherf/pom.xml b/phoenix-pherf/pom.xml
index eda4fc0..cb9406a 100644
--- a/phoenix-pherf/pom.xml
+++ b/phoenix-pherf/pom.xml
@@ -15,7 +15,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-pherf</artifactId>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-pig/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-pig/pom.xml b/phoenix-pig/pom.xml
index eb4822d..d5a037e 100644
--- a/phoenix-pig/pom.xml
+++ b/phoenix-pig/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-pig</artifactId>
<name>Phoenix - Pig</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-queryserver-client/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-queryserver-client/pom.xml b/phoenix-queryserver-client/pom.xml
index f1e9d2e..7c6ceee 100644
--- a/phoenix-queryserver-client/pom.xml
+++ b/phoenix-queryserver-client/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-queryserver-client</artifactId>
<name>Phoenix Query Server Client</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-queryserver/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-queryserver/pom.xml b/phoenix-queryserver/pom.xml
index 32ae5f3..d4e640f 100644
--- a/phoenix-queryserver/pom.xml
+++ b/phoenix-queryserver/pom.xml
@@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-queryserver</artifactId>
<name>Phoenix Query Server</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-server/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-server/pom.xml b/phoenix-server/pom.xml
index 682cbe9..38bd75a 100644
--- a/phoenix-server/pom.xml
+++ b/phoenix-server/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-server</artifactId>
<name>Phoenix Server</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-spark/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-spark/pom.xml b/phoenix-spark/pom.xml
index d44d6e5..522ca3f 100644
--- a/phoenix-spark/pom.xml
+++ b/phoenix-spark/pom.xml
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-spark</artifactId>
<name>Phoenix - Spark</name>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/phoenix-tracing-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-tracing-webapp/pom.xml b/phoenix-tracing-webapp/pom.xml
index 182b0b1..4423675 100755
--- a/phoenix-tracing-webapp/pom.xml
+++ b/phoenix-tracing-webapp/pom.xml
@@ -27,7 +27,7 @@
<parent>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
</parent>
<artifactId>phoenix-tracing-webapp</artifactId>
http://git-wip-us.apache.org/repos/asf/phoenix/blob/89014bbc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8be8548..327c9bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.phoenix</groupId>
<artifactId>phoenix</artifactId>
- <version>4.8.0-HBase-1.0</version>
+ <version>4.9.0-HBase-1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Apache Phoenix</name>
<description>A SQL layer over HBase</description>
[03/10] phoenix git commit: PHOENIX-3158 COUNT(DISTINCT) may return
null instead of 0 after PHOENIX-258.
Posted by ss...@apache.org.
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 <la...@apache.org>
Authored: Sat Aug 6 16:27:32 2016 -0700
Committer: Lars Hofhansl <la...@apache.org>
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)) {
[10/10] phoenix git commit: PHOENIX-3486 RoundRobinResultIterator
doesn't work correctly because of setting Scan's cache size inappropriately
in PhoenixInputForamt
Posted by ss...@apache.org.
PHOENIX-3486 RoundRobinResultIterator doesn't work correctly because of setting Scan's cache size inappropriately in PhoenixInputForamt
Signed-off-by: Sergey Soldatov <ss...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/6faccf1d
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/6faccf1d
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/6faccf1d
Branch: refs/heads/4.x-HBase-1.3
Commit: 6faccf1dc88c230ca80f3ff3c0d5b69ea70dbf56
Parents: 0099ec5
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Nov 21 11:03:19 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Sun Feb 19 17:22:10 2017 -0800
----------------------------------------------------------------------
.../hive/mapreduce/PhoenixInputFormat.java | 27 ++++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/6faccf1d/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index 7eab317..3a94655 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HConnection;
@@ -142,11 +143,8 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
.newJobContext(new Job(jobConf)));
boolean splitByStats = jobConf.getBoolean(PhoenixStorageHandlerConstants.SPLIT_BY_STATS,
false);
- int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
- }
+ setScanCacheSize(jobConf);
// Adding Localization
HConnection connection = HConnectionManager.createConnection(jobConf);
@@ -166,10 +164,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
if (splitByStats) {
for (Scan aScan : scans) {
- if (scanCacheSize > 0) {
- aScan.setCaching(scanCacheSize);
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Split for scan : " + aScan + "with scanAttribute : " + aScan
.getAttributesMap() + " [scanCache, cacheBlock, scanBatch] : [" +
@@ -183,12 +177,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
psplits.add(inputSplit);
}
} else {
- if (scanCacheSize > 0) {
- for (Scan aScan : scans) {
- aScan.setCaching(scanCacheSize);
- }
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Scan count[" + scans.size() + "] : " + Bytes.toStringBinary(scans
.get(0).getStartRow()) + " ~ " + Bytes.toStringBinary(scans.get(scans
@@ -216,6 +204,17 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
return psplits;
}
+ private void setScanCacheSize(JobConf jobConf) {
+ int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ if (scanCacheSize > 0) {
+ jobConf.setInt(HConstants.HBASE_CLIENT_SCANNER_CACHING, scanCacheSize);
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
+ }
+ }
+
@Override
public RecordReader<WritableComparable, T> getRecordReader(InputSplit split, JobConf job,
Reporter reporter) throws
[04/10] phoenix git commit: PHOENIX-3152 Incorrect comparator in
QueryOptimizer may cause IllegalArgumentException
Posted by ss...@apache.org.
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 <ss...@apache.org>
Authored: Sat Aug 6 16:31:13 2016 -0700
Committer: Sergey Soldatov <ss...@apache.org>
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;
}
[07/10] phoenix git commit: PHOENIX-3486 RoundRobinResultIterator
doesn't work correctly because of setting Scan's cache size inappropriately
in PhoenixInputForamt
Posted by ss...@apache.org.
PHOENIX-3486 RoundRobinResultIterator doesn't work correctly because of setting Scan's cache size inappropriately in PhoenixInputForamt
Signed-off-by: Sergey Soldatov <ss...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/280b32ad
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/280b32ad
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/280b32ad
Branch: refs/heads/4.x-HBase-0.98
Commit: 280b32ad61aa8f0c30cf4e4896d1305c59ad74c0
Parents: 54ae6f3
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Nov 21 11:03:19 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Sun Feb 19 17:21:06 2017 -0800
----------------------------------------------------------------------
.../hive/mapreduce/PhoenixInputFormat.java | 28 ++++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/280b32ad/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index 7e2f3d1..2b56e99 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HConnection;
@@ -142,14 +143,12 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
.newJobContext(new Job(jobConf)));
boolean splitByStats = jobConf.getBoolean(PhoenixStorageHandlerConstants.SPLIT_BY_STATS,
false);
- int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ setScanCacheSize(jobConf);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
- }
String tableName = qplan
.getTableRef().getTable().getPhysicalName().toString();
HTable table = new HTable(jobConf, tableName);
+
// Adding Localization
HConnection connection = HConnectionManager.createConnection(jobConf);
RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(table);
@@ -166,10 +165,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
if (splitByStats) {
for (Scan aScan : scans) {
- if (scanCacheSize > 0) {
- aScan.setCaching(scanCacheSize);
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Split for scan : " + aScan + "with scanAttribute : " + aScan
.getAttributesMap() + " [scanCache, cacheBlock, scanBatch] : [" +
@@ -183,12 +178,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
psplits.add(inputSplit);
}
} else {
- if (scanCacheSize > 0) {
- for (Scan aScan : scans) {
- aScan.setCaching(scanCacheSize);
- }
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Scan count[" + scans.size() + "] : " + Bytes.toStringBinary(scans
.get(0).getStartRow()) + " ~ " + Bytes.toStringBinary(scans.get(scans
@@ -216,6 +205,17 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
return psplits;
}
+ private void setScanCacheSize(JobConf jobConf) {
+ int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ if (scanCacheSize > 0) {
+ jobConf.setInt(HConstants.HBASE_CLIENT_SCANNER_CACHING, scanCacheSize);
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
+ }
+ }
+
@Override
public RecordReader<WritableComparable, T> getRecordReader(InputSplit split, JobConf job,
Reporter reporter) throws
[09/10] phoenix git commit: PHOENIX-3486 RoundRobinResultIterator
doesn't work correctly because of setting Scan's cache size inappropriately
in PhoenixInputForamt
Posted by ss...@apache.org.
PHOENIX-3486 RoundRobinResultIterator doesn't work correctly because of setting Scan's cache size inappropriately in PhoenixInputForamt
Signed-off-by: Sergey Soldatov <ss...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/816840ba
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/816840ba
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/816840ba
Branch: refs/heads/4.x-HBase-1.1
Commit: 816840ba9e4d9e5054b4ffb46d1fe806790affad
Parents: 893bad3
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Nov 21 11:03:19 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Sun Feb 19 17:22:04 2017 -0800
----------------------------------------------------------------------
.../hive/mapreduce/PhoenixInputFormat.java | 27 ++++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/816840ba/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index 7eab317..3a94655 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HConnection;
@@ -142,11 +143,8 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
.newJobContext(new Job(jobConf)));
boolean splitByStats = jobConf.getBoolean(PhoenixStorageHandlerConstants.SPLIT_BY_STATS,
false);
- int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
- }
+ setScanCacheSize(jobConf);
// Adding Localization
HConnection connection = HConnectionManager.createConnection(jobConf);
@@ -166,10 +164,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
if (splitByStats) {
for (Scan aScan : scans) {
- if (scanCacheSize > 0) {
- aScan.setCaching(scanCacheSize);
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Split for scan : " + aScan + "with scanAttribute : " + aScan
.getAttributesMap() + " [scanCache, cacheBlock, scanBatch] : [" +
@@ -183,12 +177,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
psplits.add(inputSplit);
}
} else {
- if (scanCacheSize > 0) {
- for (Scan aScan : scans) {
- aScan.setCaching(scanCacheSize);
- }
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Scan count[" + scans.size() + "] : " + Bytes.toStringBinary(scans
.get(0).getStartRow()) + " ~ " + Bytes.toStringBinary(scans.get(scans
@@ -216,6 +204,17 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
return psplits;
}
+ private void setScanCacheSize(JobConf jobConf) {
+ int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ if (scanCacheSize > 0) {
+ jobConf.setInt(HConstants.HBASE_CLIENT_SCANNER_CACHING, scanCacheSize);
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
+ }
+ }
+
@Override
public RecordReader<WritableComparable, T> getRecordReader(InputSplit split, JobConf job,
Reporter reporter) throws
[05/10] phoenix git commit: PHOENIX-3149 Local index got corrupted if
intermediate compaction happen during the split.(Sergey Soldatov)
Posted by ss...@apache.org.
PHOENIX-3149 Local index got corrupted if intermediate compaction happen during the split.(Sergey Soldatov)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/b64b08f3
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/b64b08f3
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/b64b08f3
Branch: refs/heads/4.x-HBase-1.0
Commit: b64b08f313490fabd6675066007897f5b472e92c
Parents: 62d4566
Author: Ankit Singhal <an...@gmail.com>
Authored: Sun Aug 7 13:55:00 2016 +0530
Committer: Ankit Singhal <an...@gmail.com>
Committed: Sun Aug 7 13:55:38 2016 +0530
----------------------------------------------------------------------
.../hbase/regionserver/IndexHalfStoreFileReaderGenerator.java | 1 -
1 file changed, 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/b64b08f3/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
index 1bd6222..45b5aef 100644
--- a/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
+++ b/phoenix-core/src/main/java/org/apache/hadoop/hbase/regionserver/IndexHalfStoreFileReaderGenerator.java
@@ -185,7 +185,6 @@ public class IndexHalfStoreFileReaderGenerator extends BaseRegionObserver {
long earliestPutTs, InternalScanner s, CompactionRequest request) throws IOException {
if (!store.getFamily().getNameAsString()
.startsWith(QueryConstants.LOCAL_INDEX_COLUMN_FAMILY_PREFIX)
- || !scanType.equals(ScanType.COMPACT_DROP_DELETES)
|| s != null
|| !store.hasReferences()) {
return s;
[06/10] phoenix git commit: PHOENIX-3486 RoundRobinResultIterator
doesn't work correctly because of setting Scan's cache size inappropriately
in PhoenixInputForamt
Posted by ss...@apache.org.
PHOENIX-3486 RoundRobinResultIterator doesn't work correctly because of setting Scan's cache size inappropriately in PhoenixInputForamt
Signed-off-by: Sergey Soldatov <ss...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/275421bc
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/275421bc
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/275421bc
Branch: refs/heads/master
Commit: 275421bcd6f20dd748a9b2e63df13426832547ba
Parents: 130f29d
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Nov 21 11:03:19 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Sun Feb 19 17:14:31 2017 -0800
----------------------------------------------------------------------
.../hive/mapreduce/PhoenixInputFormat.java | 27 ++++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/275421bc/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index 7eab317..3a94655 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HConnection;
@@ -142,11 +143,8 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
.newJobContext(new Job(jobConf)));
boolean splitByStats = jobConf.getBoolean(PhoenixStorageHandlerConstants.SPLIT_BY_STATS,
false);
- int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
- }
+ setScanCacheSize(jobConf);
// Adding Localization
HConnection connection = HConnectionManager.createConnection(jobConf);
@@ -166,10 +164,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
if (splitByStats) {
for (Scan aScan : scans) {
- if (scanCacheSize > 0) {
- aScan.setCaching(scanCacheSize);
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Split for scan : " + aScan + "with scanAttribute : " + aScan
.getAttributesMap() + " [scanCache, cacheBlock, scanBatch] : [" +
@@ -183,12 +177,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
psplits.add(inputSplit);
}
} else {
- if (scanCacheSize > 0) {
- for (Scan aScan : scans) {
- aScan.setCaching(scanCacheSize);
- }
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Scan count[" + scans.size() + "] : " + Bytes.toStringBinary(scans
.get(0).getStartRow()) + " ~ " + Bytes.toStringBinary(scans.get(scans
@@ -216,6 +204,17 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
return psplits;
}
+ private void setScanCacheSize(JobConf jobConf) {
+ int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ if (scanCacheSize > 0) {
+ jobConf.setInt(HConstants.HBASE_CLIENT_SCANNER_CACHING, scanCacheSize);
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
+ }
+ }
+
@Override
public RecordReader<WritableComparable, T> getRecordReader(InputSplit split, JobConf job,
Reporter reporter) throws
[08/10] phoenix git commit: PHOENIX-3486 RoundRobinResultIterator
doesn't work correctly because of setting Scan's cache size inappropriately
in PhoenixInputForamt
Posted by ss...@apache.org.
PHOENIX-3486 RoundRobinResultIterator doesn't work correctly because of setting Scan's cache size inappropriately in PhoenixInputForamt
Signed-off-by: Sergey Soldatov <ss...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/1da595b0
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/1da595b0
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/1da595b0
Branch: refs/heads/4.x-HBase-1.0
Commit: 1da595b0364676174a0070a353eff6ad1e2ab706
Parents: b64b08f
Author: Jeongdae Kim <kj...@gmail.com>
Authored: Mon Nov 21 11:03:19 2016 +0900
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Sun Feb 19 17:21:58 2017 -0800
----------------------------------------------------------------------
.../hive/mapreduce/PhoenixInputFormat.java | 27 ++++++++++----------
1 file changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/1da595b0/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index c5f6d18..3613b1f 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -23,6 +23,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.HRegionLocation;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.HConnection;
@@ -144,11 +145,8 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
.newJobContext(new Job(jobConf)));
boolean splitByStats = jobConf.getBoolean(PhoenixStorageHandlerConstants.SPLIT_BY_STATS,
false);
- int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
- }
+ setScanCacheSize(jobConf);
// Adding Localization
HConnection connection = HConnectionManager.createConnection(jobConf);
@@ -168,10 +166,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
if (splitByStats) {
for (Scan aScan : scans) {
- if (scanCacheSize > 0) {
- aScan.setCaching(scanCacheSize);
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Split for scan : " + aScan + "with scanAttribute : " + aScan
.getAttributesMap() + " [scanCache, cacheBlock, scanBatch] : [" +
@@ -185,12 +179,6 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
psplits.add(inputSplit);
}
} else {
- if (scanCacheSize > 0) {
- for (Scan aScan : scans) {
- aScan.setCaching(scanCacheSize);
- }
- }
-
if (LOG.isDebugEnabled()) {
LOG.debug("Scan count[" + scans.size() + "] : " + Bytes.toStringBinary(scans
.get(0).getStartRow()) + " ~ " + Bytes.toStringBinary(scans.get(scans
@@ -218,6 +206,17 @@ public class PhoenixInputFormat<T extends DBWritable> implements InputFormat<Wri
return psplits;
}
+ private void setScanCacheSize(JobConf jobConf) {
+ int scanCacheSize = jobConf.getInt(PhoenixStorageHandlerConstants.HBASE_SCAN_CACHE, -1);
+ if (scanCacheSize > 0) {
+ jobConf.setInt(HConstants.HBASE_CLIENT_SCANNER_CACHING, scanCacheSize);
+ }
+
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Generating splits with scanCacheSize : " + scanCacheSize);
+ }
+ }
+
@Override
public RecordReader<WritableComparable, T> getRecordReader(InputSplit split, JobConf job,
Reporter reporter) throws
[02/10] phoenix git commit: PHOENIX-3156 DistinctPrefixFilter
optimization produces incorrect results with some non-pk WHERE conditions.
Posted by ss...@apache.org.
PHOENIX-3156 DistinctPrefixFilter optimization produces incorrect results with some non-pk WHERE conditions.
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/503fba67
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/503fba67
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/503fba67
Branch: refs/heads/4.x-HBase-1.0
Commit: 503fba67d42da9facc9f072e24ced3f033eb6d55
Parents: 89014bb
Author: Lars Hofhansl <la...@apache.org>
Authored: Fri Aug 5 21:39:56 2016 -0700
Committer: Lars Hofhansl <la...@apache.org>
Committed: Fri Aug 5 21:40:57 2016 -0700
----------------------------------------------------------------------
.../org/apache/phoenix/end2end/DistinctPrefixFilterIT.java | 7 ++++---
.../java/org/apache/phoenix/iterate/BaseResultIterators.java | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/503fba67/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 9d31070..1a0e4e1 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
@@ -171,8 +171,6 @@ public class DistinctPrefixFilterIT extends BaseHBaseManagedTimeTableReuseIT {
testPlan("SELECT COUNT(*) FROM (SELECT DISTINCT(prefix1) FROM "+testTable+")", true);
testPlan("SELECT /*+ RANGE_SCAN */ DISTINCT prefix1 FROM "+testTable, false);
testPlan("SELECT DISTINCT prefix1, prefix2 FROM "+testTable, true);
- // use the filter even when the boolean expression filter is used
- testPlan("SELECT DISTINCT prefix1, prefix2 FROM "+testTable+ " WHERE col1 > 0.5", true);
// do not use the filter when the distinct is on the entire key
testPlan("SELECT DISTINCT prefix1, prefix2, prefix3 FROM "+testTable, false);
testPlan("SELECT DISTINCT (prefix1, prefix2, prefix3) FROM "+testTable, false);
@@ -193,7 +191,6 @@ public class DistinctPrefixFilterIT extends BaseHBaseManagedTimeTableReuseIT {
testPlan("SELECT (prefix1, prefix2, prefix3) FROM "+testTable+" GROUP BY (prefix1, prefix2, prefix3)", false);
testPlan("SELECT prefix1, 1, 2 FROM "+testTable+" GROUP BY prefix1", true);
testPlan("SELECT prefix1 FROM "+testTable+" GROUP BY prefix1, col1", false);
- testPlan("SELECT DISTINCT prefix1, prefix2 FROM "+testTable+" WHERE col1 > 0.5", true);
testPlan("SELECT COUNT(DISTINCT prefix1) FROM "+testTable+" HAVING COUNT(col1) > 10", false);
testPlan("SELECT COUNT(DISTINCT prefix1) FROM "+testTable+" ORDER BY COUNT(col1)", true);
@@ -204,6 +201,8 @@ public class DistinctPrefixFilterIT extends BaseHBaseManagedTimeTableReuseIT {
testPlan("SELECT COUNT(DISTINCT prefix1) FROM "+testTable+" HAVING COUNT(DISTINCT prefix2) > 10", false);
testPlan("SELECT COUNT(DISTINCT prefix1) FROM "+testTable+" HAVING COUNT(DISTINCT prefix1) > 10", false);
testPlan("SELECT COUNT(DISTINCT prefix1) / 10 FROM "+testTable, false);
+ // do not use the filter when the boolean expression filter is used
+ testPlan("SELECT DISTINCT prefix1, prefix2 FROM "+testTable+" WHERE col1 > 0.5", false);
}
private void testPlan(String query, boolean optimizable) throws Exception {
@@ -220,6 +219,7 @@ public class DistinctPrefixFilterIT extends BaseHBaseManagedTimeTableReuseIT {
testSkipRange("SELECT %s prefix1 FROM "+ testTableF + " GROUP BY prefix1, prefix2 HAVING prefix2 = 2147483647", 2);
testSkipRange("SELECT %s prefix1 FROM "+ testTableF + " GROUP BY prefix1, prefix2 HAVING prefix1 = 2147483647", 1);
testSkipRange("SELECT %s prefix1 FROM "+ testTableF + " WHERE col1 > 0.99 GROUP BY prefix1, prefix2 HAVING prefix2 = 2", -1);
+ testSkipRange("SELECT %s prefix1 FROM "+ testTableF + " WHERE col1 >=0 and col2 > 990 GROUP BY prefix1, prefix2 HAVING prefix2 = 2", -1);
testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " GROUP BY prefix1, prefix2 HAVING prefix1 IN ('1','2')", 6);
testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " GROUP BY prefix1, prefix2 HAVING prefix1 IN ('1','2') AND prefix2 IN ('1','2')", 4);
@@ -228,6 +228,7 @@ public class DistinctPrefixFilterIT extends BaseHBaseManagedTimeTableReuseIT {
testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " GROUP BY prefix1, prefix2 HAVING prefix2 = '22'", 1);
testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " GROUP BY prefix1, prefix2 HAVING prefix1 = '22'", 1);
testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " WHERE col1 > 0.99 GROUP BY prefix1, prefix2 HAVING prefix2 = '2'", -1);
+ testSkipRange("SELECT %s prefix1 FROM "+ testTableV + " WHERE col1 >= 0 and col2 > 990 GROUP BY prefix1, prefix2 HAVING prefix2 = '2'", -1);
testCommonGroupBy(testTableF);
testCommonGroupBy(testTableV);
http://git-wip-us.apache.org/repos/asf/phoenix/blob/503fba67/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
index d0ade72..ceba000 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/iterate/BaseResultIterators.java
@@ -227,7 +227,7 @@ public abstract class BaseResultIterators extends ExplainTable implements Result
}
int cols = plan.getGroupBy().getOrderPreservingColumnCount();
- if (cols > 0 &&
+ if (cols > 0 && context.getWhereConditionColumns().size() == 0 &&
!plan.getStatement().getHint().hasHint(HintNode.Hint.RANGE_SCAN) &&
cols < plan.getTableRef().getTable().getRowKeySchema().getFieldCount() &&
plan.getGroupBy().isOrderPreserving() &&