Apache-Phoenix | Master | Build Successful

2016-10-25 Thread Apache Jenkins Server
Master branch build status Successful
Source repository https://git-wip-us.apache.org/repos/asf?p=phoenix.git;a=shortlog;h=refs/heads/master

Last Successful Compiled Artifacts https://builds.apache.org/job/Phoenix-master/lastSuccessfulBuild/artifact/

Last Complete Test Report https://builds.apache.org/job/Phoenix-master/lastCompletedBuild/testReport/

Changes
[jamestaylor] PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE



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


Apache Phoenix - Timeout crawler - Build https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1346/

2016-10-25 Thread Apache Jenkins Server
[...truncated 21 lines...]
Looking at the log, list of test(s) that timed-out:

Build:
https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1346/


Affected test class(es):
Set(['org.apache.phoenix.end2end.IndexExtendedIT'])


Build step 'Execute shell' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any


phoenix git commit: PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 4cdbaf4f8 -> fc7bb297e


PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use 
parent VIEW indexes


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

Branch: refs/heads/4.x-HBase-1.1
Commit: fc7bb297eced4303f2e92c62d4a9821ba922bcc9
Parents: 4cdbaf4
Author: James Taylor 
Authored: Tue Oct 25 21:25:03 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 21:28:13 2016 -0700

--
 .../phoenix/end2end/index/ViewIndexIT.java  | 39 +---
 1 file changed, 34 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/fc7bb297/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 99c8d2b..46aefff 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.sql.Connection;
 import java.sql.Date;
@@ -44,6 +45,7 @@ import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PNameFactory;
 import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -296,11 +298,10 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 assertEquals(expectedCount, rs.getInt(1));
 // Ensure that index is being used
 rs = stmt.executeQuery("EXPLAIN SELECT COUNT(*) FROM " + 
fullTableName);
-// Uses index and finds correct number of rows
-assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName)))
 + " [-32768,'123451234512345']\n" + 
-"SERVER FILTER BY FIRST KEY ONLY\n" + 
-"SERVER AGGREGATE INTO SINGLE ROW",
-QueryUtil.getExplainPlan(rs));
+if (fullBaseName != null) {
+// Uses index and finds correct number of rows
+assertTrue(QueryUtil.getExplainPlan(rs).startsWith("CLIENT 
PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName);
 
+}
 
 // Force it not to use index and still finds correct number of rows
 rs = stmt.executeQuery("SELECT /*+ NO_INDEX */ * FROM " + 
fullTableName);
@@ -369,13 +370,41 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 tsConn.commit();
 assertRowCount(tsConn, tsViewFullName, baseFullName, 8);
 
+// Use different connection for delete
 Connection tsConn2 = DriverManager.getConnection(getUrl(), 
tsProps);
 tsConn2.createStatement().execute("DELETE FROM " + tsViewFullName 
+ " WHERE DOUBLE1 > 7.5 AND DOUBLE1 < 9.5");
 tsConn2.commit();
 assertRowCount(tsConn2, tsViewFullName, baseFullName, 6);
 
+tsConn2.createStatement().execute("DROP VIEW " + tsViewFullName);
+// Should drop view and index and remove index data
+conn.createStatement().execute("DROP VIEW " + viewFullName);
+// Deletes table data (but wouldn't update index)
+conn.setAutoCommit(true);
+conn.createStatement().execute("DELETE FROM " + baseFullName);
+Connection tsConn3 = DriverManager.getConnection(getUrl(), 
tsProps);
+try {
+tsConn3.createStatement().execute("SELECT * FROM " + 
tsViewFullName + " LIMIT 1");
+fail("Expected table not to be found");
+} catch (TableNotFoundException e) {
+
+}
+conn.createStatement().execute(
+"CREATE VIEW " + viewFullName + " (\n" + 
+"INT1 BIGINT NOT NULL,\n" + 
+"DOUBLE1 DECIMAL(12, 3),\n" +
+

phoenix git commit: PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 0dc0d7988 -> 9ebd09219


PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use 
parent VIEW indexes


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 9ebd0921952501618f3e87fc02fba09ba779d1ef
Parents: 0dc0d79
Author: James Taylor 
Authored: Tue Oct 25 21:25:03 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 21:26:49 2016 -0700

--
 .../phoenix/end2end/index/ViewIndexIT.java  | 39 +---
 1 file changed, 34 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9ebd0921/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 99c8d2b..46aefff 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.sql.Connection;
 import java.sql.Date;
@@ -44,6 +45,7 @@ import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PNameFactory;
 import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -296,11 +298,10 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 assertEquals(expectedCount, rs.getInt(1));
 // Ensure that index is being used
 rs = stmt.executeQuery("EXPLAIN SELECT COUNT(*) FROM " + 
fullTableName);
-// Uses index and finds correct number of rows
-assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName)))
 + " [-32768,'123451234512345']\n" + 
-"SERVER FILTER BY FIRST KEY ONLY\n" + 
-"SERVER AGGREGATE INTO SINGLE ROW",
-QueryUtil.getExplainPlan(rs));
+if (fullBaseName != null) {
+// Uses index and finds correct number of rows
+assertTrue(QueryUtil.getExplainPlan(rs).startsWith("CLIENT 
PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName);
 
+}
 
 // Force it not to use index and still finds correct number of rows
 rs = stmt.executeQuery("SELECT /*+ NO_INDEX */ * FROM " + 
fullTableName);
@@ -369,13 +370,41 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 tsConn.commit();
 assertRowCount(tsConn, tsViewFullName, baseFullName, 8);
 
+// Use different connection for delete
 Connection tsConn2 = DriverManager.getConnection(getUrl(), 
tsProps);
 tsConn2.createStatement().execute("DELETE FROM " + tsViewFullName 
+ " WHERE DOUBLE1 > 7.5 AND DOUBLE1 < 9.5");
 tsConn2.commit();
 assertRowCount(tsConn2, tsViewFullName, baseFullName, 6);
 
+tsConn2.createStatement().execute("DROP VIEW " + tsViewFullName);
+// Should drop view and index and remove index data
+conn.createStatement().execute("DROP VIEW " + viewFullName);
+// Deletes table data (but wouldn't update index)
+conn.setAutoCommit(true);
+conn.createStatement().execute("DELETE FROM " + baseFullName);
+Connection tsConn3 = DriverManager.getConnection(getUrl(), 
tsProps);
+try {
+tsConn3.createStatement().execute("SELECT * FROM " + 
tsViewFullName + " LIMIT 1");
+fail("Expected table not to be found");
+} catch (TableNotFoundException e) {
+
+}
+conn.createStatement().execute(
+"CREATE VIEW " + viewFullName + " (\n" + 
+"INT1 BIGINT NOT NULL,\n" + 
+"DOUBLE1 DECIMAL(12, 3),\n" +
+

phoenix git commit: PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master a5bcb3ea9 -> 202b8eb1e


PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use 
parent VIEW indexes


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

Branch: refs/heads/master
Commit: 202b8eb1eda29db01006cdeefd8199f0bd360692
Parents: a5bcb3e
Author: James Taylor 
Authored: Tue Oct 25 21:25:03 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 21:26:01 2016 -0700

--
 .../phoenix/end2end/index/ViewIndexIT.java  | 39 +---
 1 file changed, 34 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/202b8eb1/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 99c8d2b..46aefff 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -23,6 +23,7 @@ import static 
org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
 import java.sql.Connection;
 import java.sql.Date;
@@ -44,6 +45,7 @@ import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PNameFactory;
 import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.schema.TableNotFoundException;
 import org.apache.phoenix.util.MetaDataUtil;
 import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
@@ -296,11 +298,10 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 assertEquals(expectedCount, rs.getInt(1));
 // Ensure that index is being used
 rs = stmt.executeQuery("EXPLAIN SELECT COUNT(*) FROM " + 
fullTableName);
-// Uses index and finds correct number of rows
-assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName)))
 + " [-32768,'123451234512345']\n" + 
-"SERVER FILTER BY FIRST KEY ONLY\n" + 
-"SERVER AGGREGATE INTO SINGLE ROW",
-QueryUtil.getExplainPlan(rs));
+if (fullBaseName != null) {
+// Uses index and finds correct number of rows
+assertTrue(QueryUtil.getExplainPlan(rs).startsWith("CLIENT 
PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName);
 
+}
 
 // Force it not to use index and still finds correct number of rows
 rs = stmt.executeQuery("SELECT /*+ NO_INDEX */ * FROM " + 
fullTableName);
@@ -369,13 +370,41 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 tsConn.commit();
 assertRowCount(tsConn, tsViewFullName, baseFullName, 8);
 
+// Use different connection for delete
 Connection tsConn2 = DriverManager.getConnection(getUrl(), 
tsProps);
 tsConn2.createStatement().execute("DELETE FROM " + tsViewFullName 
+ " WHERE DOUBLE1 > 7.5 AND DOUBLE1 < 9.5");
 tsConn2.commit();
 assertRowCount(tsConn2, tsViewFullName, baseFullName, 6);
 
+tsConn2.createStatement().execute("DROP VIEW " + tsViewFullName);
+// Should drop view and index and remove index data
+conn.createStatement().execute("DROP VIEW " + viewFullName);
+// Deletes table data (but wouldn't update index)
+conn.setAutoCommit(true);
+conn.createStatement().execute("DELETE FROM " + baseFullName);
+Connection tsConn3 = DriverManager.getConnection(getUrl(), 
tsProps);
+try {
+tsConn3.createStatement().execute("SELECT * FROM " + 
tsViewFullName + " LIMIT 1");
+fail("Expected table not to be found");
+} catch (TableNotFoundException e) {
+
+}
+conn.createStatement().execute(
+"CREATE VIEW " + viewFullName + " (\n" + 
+"INT1 BIGINT NOT NULL,\n" + 
+"DOUBLE1 DECIMAL(12, 3),\n" +
+"IS_BOOLEAN 

Jenkins build is back to normal : Phoenix-4.8-HBase-1.2 #42

2016-10-25 Thread Apache Jenkins Server
See 



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

2016-10-25 Thread Apache Jenkins Server
See 

Changes:

[jamestaylor] PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE

[jamestaylor] PHOENIX-3371 Aggregate Function is broken if secondary index 
exists

[jamestaylor] PHOENIX-3328 Optimize ORed leading pk column range comparisions to

[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non 
leading

--
[...truncated 1040 lines...]
at 
org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2795)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:700)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:662)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2046)
at 
org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32393)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2117)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:104)
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)
Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedWithDetailsException: 
Failed 2 actions: org.apache.hadoop.hbase.DoNotRetryIOException
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT$FailingRegionObserver.preBatchMutate(MutableIndexFailureIT.java:398)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$35.call(RegionCoprocessorHost.java:1024)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost$RegionOperation.call(RegionCoprocessorHost.java:1708)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1783)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.execOperation(RegionCoprocessorHost.java:1740)
at 
org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost.preBatchMutate(RegionCoprocessorHost.java:1020)
at 
org.apache.hadoop.hbase.regionserver.HRegion.doMiniBatchMutation(HRegion.java:3078)
at 
org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2853)
at 
org.apache.hadoop.hbase.regionserver.HRegion.batchMutate(HRegion.java:2795)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doBatchOp(RSRpcServices.java:700)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.doNonAtomicRegionMutation(RSRpcServices.java:662)
at 
org.apache.hadoop.hbase.regionserver.RSRpcServices.multi(RSRpcServices.java:2046)
at 
org.apache.hadoop.hbase.client.MultiServerCallable.call(MultiServerCallable.java:129)
at 
org.apache.hadoop.hbase.client.MultiServerCallable.call(MultiServerCallable.java:54)
at 
org.apache.hadoop.hbase.client.RpcRetryingCaller.callWithoutRetries(RpcRetryingCaller.java:200)
at 
org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl$SingleServerRequestRunnable.run(AsyncProcess.java:708)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
: 2 times, 
at 
org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.makeException(AsyncProcess.java:228)
at 
org.apache.hadoop.hbase.client.AsyncProcess$BatchErrors.access$1700(AsyncProcess.java:208)
at 
org.apache.hadoop.hbase.client.AsyncProcess$AsyncRequestFutureImpl.getErrors(AsyncProcess.java:1599)
at org.apache.hadoop.hbase.client.HTable.batch(HTable.java:936)
at org.apache.hadoop.hbase.client.HTable.batch(HTable.java:950)
at 
org.apache.hadoop.hbase.client.HTableWrapper.batch(HTableWrapper.java:255)
at 
org.apache.phoenix.execute.DelegateHTable.batch(DelegateHTable.java:94)
at 
org.apache.phoenix.hbase.index.write.ParallelWriterIndexCommitter$1.call(ParallelWriterIndexCommitter.java:167)
at 
org.apache.phoenix.hbase.index.write.ParallelWriterIndexCommitter$1.call(ParallelWriterIndexCommitter.java:131)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
: 1 time, 
at 
org.apache.phoenix.end2end.index.MutableIndexFailureIT.helpTestWriteFailureDisablesIndex(MutableIndexFailureIT.java:225)
at 

Apache-Phoenix | 4.8-HBase-0.98 | Build Successful

2016-10-25 Thread Apache Jenkins Server
4.8-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.8-HBase-0.98

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

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

Changes
[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non leading

[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non leading



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


Apache-Phoenix | 4.8-HBase-1.0 | Build Successful

2016-10-25 Thread Apache Jenkins Server
4.8-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.8-HBase-1.0

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

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

Changes
[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non leading



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


Apache-Phoenix | 4.8-HBase-1.1 | Build Successful

2016-10-25 Thread Apache Jenkins Server
4.8-HBase-1.1 branch build status Successful

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

Compiled Artifacts https://builds.apache.org/job/Phoenix-4.8-HBase-1.1/lastSuccessfulBuild/artifact/

Test Report https://builds.apache.org/job/Phoenix-4.8-HBase-1.1/lastCompletedBuild/testReport/

Changes
[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non leading



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


Build failed in Jenkins: Phoenix-4.8-HBase-1.2 #41

2016-10-25 Thread Apache Jenkins Server
See 

Changes:

[jamestaylor] PHOENIX-3382 Query using Row Value Constructor comprised of non 
leading

--
[...truncated 275 lines...]
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec - in 
org.apache.phoenix.util.PrefixByteEncoderDecoderTest
Running org.apache.phoenix.util.PhoenixContextExecutorTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec - in 
org.apache.phoenix.util.PhoenixContextExecutorTest
Running org.apache.phoenix.util.ScanUtilTest
Tests run: 20, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.08 sec - in 
org.apache.phoenix.util.ScanUtilTest
Running org.apache.phoenix.util.Base62EncoderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.076 sec - in 
org.apache.phoenix.util.Base62EncoderTest
Running 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.027 sec - in 
org.apache.phoenix.hbase.index.covered.filter.TestApplyAndFilterDeletesFilter
Running org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in 
org.apache.phoenix.hbase.index.covered.filter.TestNewerTimestampFilter
Running org.apache.phoenix.hbase.index.covered.TestCoveredColumns
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.006 sec - in 
org.apache.phoenix.hbase.index.covered.TestCoveredColumns
Running 
org.apache.phoenix.hbase.index.covered.example.TestCoveredColumnIndexCodec
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.113 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestCoveredColumnIndexCodec
Running org.apache.phoenix.hbase.index.covered.example.TestColumnTracker
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestColumnTracker
Running 
org.apache.phoenix.hbase.index.covered.example.TestCoveredIndexSpecifierBuilder
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.011 sec - in 
org.apache.phoenix.hbase.index.covered.example.TestCoveredIndexSpecifierBuilder
Running org.apache.phoenix.hbase.index.covered.data.TestIndexMemStore
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.012 sec - in 
org.apache.phoenix.hbase.index.covered.data.TestIndexMemStore
Running org.apache.phoenix.hbase.index.covered.update.TestIndexUpdateManager
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec - in 
org.apache.phoenix.hbase.index.covered.update.TestIndexUpdateManager
Running org.apache.phoenix.hbase.index.covered.TestLocalTableState
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.297 sec - in 
org.apache.phoenix.hbase.index.covered.TestLocalTableState
Running org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.689 sec - in 
org.apache.phoenix.util.json.JsonUpsertExecutorTest
Running 
org.apache.phoenix.hbase.index.write.recovery.TestPerRegionIndexWriteCache
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec - in 
org.apache.phoenix.hbase.index.util.TestIndexManagementUtil
Running org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.358 sec - in 
org.apache.phoenix.hbase.index.write.TestParalleIndexWriter
Running org.apache.phoenix.hbase.index.write.TestCachingHTableFactory
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.066 sec - in 
org.apache.phoenix.hbase.index.write.TestCachingHTableFactory
Running org.apache.phoenix.hbase.index.write.TestIndexWriter
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.368 sec - in 
org.apache.phoenix.hbase.index.write.TestIndexWriter
Running org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.004 sec - in 
org.apache.phoenix.hbase.index.write.TestWALRecoveryCaching
Running org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.122 sec - in 
org.apache.phoenix.hbase.index.write.TestParalleWriterIndexCommitter
Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.004 sec - in 
org.apache.phoenix.hbase.index.parallel.TestThreadPoolManager
Running org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in 
org.apache.phoenix.hbase.index.parallel.TestThreadPoolBuilder
Running org.apache.phoenix.filter.DistinctPrefixFilterTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.036 sec - in 

Apache Phoenix - Timeout crawler - Build https://builds.apache.org/job/Phoenix-4.8-HBase-1.2/41/

2016-10-25 Thread Apache Jenkins Server
[...truncated 24 lines...]
Looking at the log, list of test(s) that timed-out:

Build:
https://builds.apache.org/job/Phoenix-4.8-HBase-1.2/41/


Affected test class(es):
Set(['org.apache.phoenix.end2end.ArrayIT', 
'org.apache.phoenix.end2end.ClientTimeArithmeticQueryIT', 
'org.apache.phoenix.end2end.CaseStatementIT', 
'org.apache.phoenix.end2end.AggregateQueryIT', 
'org.apache.phoenix.end2end.CastAndCoerceIT'])


Build step 'Execute shell' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any


phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.2 1cb359769 -> b52321d77


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.8-HBase-1.2
Commit: b52321d7769ea785a4336c36242497a47be711d3
Parents: 1cb3597
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:25:00 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b52321d7/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index c4e4665..c8eb95a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateRandomString();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, 

phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.1 da21bca6d -> 3bd49e06e


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.8-HBase-1.1
Commit: 3bd49e06e907c89794a410e2e6451ee75c78c9ab
Parents: da21bca
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:23:32 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/3bd49e06/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index c4e4665..c8eb95a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateRandomString();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, 

phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-1.0 1afcb2e35 -> a28119d52


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.8-HBase-1.0
Commit: a28119d52ede8107c8237740678ea1ddd9ceb2c1
Parents: 1afcb2e
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:21:33 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a28119d5/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index c4e4665..c8eb95a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateRandomString();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, 

phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results (missing file)

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-0.98 c394b4ee1 -> 0aafcd4f5


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results (missing file)


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

Branch: refs/heads/4.8-HBase-0.98
Commit: 0aafcd4f5553f7af44d5c048046f213d630b3e96
Parents: c394b4e
Author: James Taylor 
Authored: Tue Oct 25 17:19:29 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:19:29 2016 -0700

--
 .../src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0aafcd4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index 3172a20..c8eb95a 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -375,7 +375,7 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 @Test
 public void testRVCOnDescWithLeadingPKEquality() throws Exception {
 final Connection conn = DriverManager.getConnection(getUrl());
-String fullTableName = generateUniqueName();
+String fullTableName = generateRandomString();
 try (Statement stmt = conn.createStatement()) {
 stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
 "ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
@@ -435,7 +435,7 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 @Test
 public void testSingleDescPKColumnComparison() throws Exception {
 final Connection conn = DriverManager.getConnection(getUrl());
-String fullTableName = generateUniqueName();
+String fullTableName = generateRandomString();
 try (Statement stmt = conn.createStatement()) {
 stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
 "ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 



phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.8-HBase-0.98 04a76294b -> c394b4ee1


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.8-HBase-0.98
Commit: c394b4ee1e9f2de0a9d3dd1a77fbf653a69bbbeb
Parents: 04a7629
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:13:07 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c394b4ee/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index c4e4665..3172a20 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends 
BaseHBaseManagedTimeTableReuseIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateUniqueName();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, 

[1/4] phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.1 910fc34d9 -> 4cdbaf4f8


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 4cdbaf4f88e3e13ddd0377e594a00a735eacf75c
Parents: 96b14f5
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:05:33 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/4cdbaf4f/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index 041e96d..b9162de 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends ParallelStatsDisabledIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateUniqueName();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+ 

[4/4] phoenix git commit: PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes

2016-10-25 Thread jamestaylor
PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use 
parent VIEW indexes


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 21befa2dc22b805ff1da8212e3c4f4679843dd9f
Parents: 910fc34
Author: James Taylor 
Authored: Wed Oct 12 16:11:26 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:05:33 2016 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 64 +++-
 1 file changed, 63 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/21befa2d/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index 7697d8c..2439ac9 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -457,6 +457,29 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 return plan.getContext().getScan();
 }
 
+private QueryPlan getQueryPlan(String query) throws SQLException {
+return getQueryPlan(query, Collections.emptyList());
+}
+
+private QueryPlan getOptimizedQueryPlan(String query) throws SQLException {
+return getOptimizedQueryPlan(query, Collections.emptyList());
+}
+
+private QueryPlan getOptimizedQueryPlan(String query, List binds) 
throws SQLException {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+PhoenixPreparedStatement statement = 
conn.prepareStatement(query).unwrap(PhoenixPreparedStatement.class);
+for (Object bind : binds) {
+statement.setObject(1, bind);
+}
+QueryPlan plan = statement.optimizeQuery(query);
+return plan;
+} finally {
+conn.close();
+}
+}
+
 private QueryPlan getQueryPlan(String query, List binds) throws 
SQLException {
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -2263,7 +2286,7 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
 try {
 conn.createStatement().execute(
-"CREATE TABLE t (k VARCHAR NOT NULL PRIMARY 
KEY, v1 VARCHAR) GUIDE_POST_WIDTH = -1");
+"CREATE TABLE t (k VARCHAR NOT NULL PRIMARY KEY, v1 
VARCHAR) GUIDE_POSTS_WIDTH = -1");
 fail();
 } catch (SQLException e) {
 assertEquals("Unexpected Exception",
@@ -2443,4 +2466,43 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 conn.close();
 }
 }
+
+@Test
+public void testIndexOnViewWithChildView() throws SQLException {
+try (Connection conn = DriverManager.getConnection(getUrl())) {
+conn.createStatement().execute("CREATE TABLE 
PLATFORM_ENTITY.GLOBAL_TABLE (\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"KEY_PREFIX CHAR(3) NOT NULL,\n" + 
+"CREATED_DATE DATE,\n" + 
+"CREATED_BY CHAR(15),\n" + 
+"CONSTRAINT PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"KEY_PREFIX\n" + 
+")\n" + 
+") VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true");
+conn.createStatement().execute("CREATE VIEW 
PLATFORM_ENTITY.GLOBAL_VIEW  (\n" + 
+"INT1 BIGINT NOT NULL,\n" + 
+"DOUBLE1 DECIMAL(12, 3),\n" + 
+"IS_BOOLEAN BOOLEAN,\n" + 
+"TEXT1 VARCHAR,\n" + 
+"CONSTRAINT PKVIEW PRIMARY KEY\n" + 
+"(\n" + 
+"INT1\n" + 
+")\n" + 
+")\n" + 
+"AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE 
KEY_PREFIX = '123'");
+conn.createStatement().execute("CREATE INDEX GLOBAL_INDEX\n" + 
+

[3/4] phoenix git commit: PHOENIX-3328 Optimize ORed leading pk column range comparisions to SkipScan (William Yang)

2016-10-25 Thread jamestaylor
PHOENIX-3328 Optimize ORed leading pk column range comparisions to SkipScan 
(William Yang)


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 96b14f5decb759ff6869a6e9934a72a03d136137
Parents: 1d4a88d
Author: James Taylor 
Authored: Sat Oct 15 15:19:47 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:05:33 2016 -0700

--
 .../apache/phoenix/compile/WhereOptimizer.java  | 23 -
 .../phoenix/compile/WhereOptimizerTest.java | 53 
 .../java/org/apache/phoenix/util/TestUtil.java  |  7 +++
 3 files changed, 81 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/96b14f5d/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
index f49aa52..f15a251 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
@@ -750,12 +750,31 @@ public class WhereOptimizer {
}
 }
 } else {
+boolean hasFirstSlot = true;
+boolean prevIsNull = false;
 // TODO: Do the same optimization that we do for IN if the 
childSlots specify a fully qualified row key
 for (KeySlot slot : childSlot) {
-// We have a nested OR with nothing for this slot, so 
continue
+if (hasFirstSlot) {
+// if the first slot is null, return null 
immediately
+if (slot == null) {
+return null;
+}
+// mark that we've handled the first slot
+hasFirstSlot = false;
+}
+
+// now if current slot is the first one, it must not 
be null
+// if not the first, then it might be null, so check 
if all the rest are null
 if (slot == null) {
-return null; //If one childSlot does not have the 
PK columns, let Phoenix scan all the key ranges of the table. 
+prevIsNull = true;
+continue;
+} else {
+// current slot is not null but prev one is null, 
cannot OR these together (PHOENIX-3328)
+if (prevIsNull) {
+return null;
+}
 }
+
 /*
  * If we see a different PK column than before, we 
can't
  * optimize it because our SkipScanFilter only handles

http://git-wip-us.apache.org/repos/asf/phoenix/blob/96b14f5d/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
index a116a2c..e056c47 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.compile;
 
 import static org.apache.phoenix.query.QueryConstants.MILLIS_IN_DAY;
 import static org.apache.phoenix.util.TestUtil.BINARY_NAME;
+import static org.apache.phoenix.util.TestUtil.BTABLE_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.apache.phoenix.util.TestUtil.assertDegenerate;
 import static org.apache.phoenix.util.TestUtil.assertEmptyScanKey;
@@ -28,6 +29,7 @@ import static org.apache.phoenix.util.TestUtil.rowKeyFilter;
 import static org.apache.phoenix.util.TestUtil.substr;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -38,6 +40,7 @@ import java.sql.Connection;
 import java.sql.Date;
 import 

[2/4] phoenix git commit: PHOENIX-3371 Aggregate Function is broken if secondary index exists

2016-10-25 Thread jamestaylor
PHOENIX-3371 Aggregate Function is broken if secondary index exists


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

Branch: refs/heads/4.x-HBase-1.1
Commit: 1d4a88df749755534e889d1ff19d1ec41afbe8f3
Parents: 21befa2
Author: James Taylor 
Authored: Wed Oct 12 19:14:55 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 17:05:33 2016 -0700

--
 .../phoenix/end2end/index/ViewIndexIT.java  | 97 
 .../apache/phoenix/schema/MetaDataClient.java   |  7 +-
 2 files changed, 99 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/1d4a88df/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 9e63093..99c8d2b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end.index;
 
 import static org.apache.phoenix.util.MetaDataUtil.getViewIndexSequenceName;
 import static 
org.apache.phoenix.util.MetaDataUtil.getViewIndexSequenceSchemaName;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -34,6 +35,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
@@ -42,6 +44,8 @@ import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PNameFactory;
 import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.util.MetaDataUtil;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.SchemaUtil;
@@ -284,4 +288,97 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 assertEquals(6, plan.getSplits().size());
 }
 }
+
+private void assertRowCount(Connection conn, String fullTableName, String 
fullBaseName, int expectedCount) throws SQLException {
+PhoenixStatement stmt = 
conn.createStatement().unwrap(PhoenixStatement.class);
+ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
fullTableName);
+assertTrue(rs.next());
+assertEquals(expectedCount, rs.getInt(1));
+// Ensure that index is being used
+rs = stmt.executeQuery("EXPLAIN SELECT COUNT(*) FROM " + 
fullTableName);
+// Uses index and finds correct number of rows
+assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName)))
 + " [-32768,'123451234512345']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+"SERVER AGGREGATE INTO SINGLE ROW",
+QueryUtil.getExplainPlan(rs));
+
+// Force it not to use index and still finds correct number of rows
+rs = stmt.executeQuery("SELECT /*+ NO_INDEX */ * FROM " + 
fullTableName);
+int count = 0;
+while (rs.next()) {
+count++;
+}
+
+assertEquals(expectedCount, count);
+// Ensure that the table, not index is being used
+assertEquals(fullTableName, 
stmt.getQueryPlan().getContext().getCurrentTable().getTable().getName().getString());
+}
+
+@Test
+public void testUpdateOnTenantViewWithGlobalView() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String baseSchemaName = "PLATFORM_ENTITY";
+String baseTableName = generateUniqueName();
+String baseFullName = SchemaUtil.getTableName(baseSchemaName, 
baseTableName);
+String viewTableName = "V_" + generateUniqueName();
+String viewFullName = SchemaUtil.getTableName(baseSchemaName, 
viewTableName);
+String indexName = "I_" + generateUniqueName();
+String tsViewTableName = "TSV_" + generateUniqueName();
+String tsViewFullName = 

[4/4] phoenix git commit: PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use parent VIEW indexes

2016-10-25 Thread jamestaylor
PHOENIX-3370 VIEW derived from another VIEW with WHERE on a TABLE doesn't use 
parent VIEW indexes


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 9b851d5c605c0fdcb8ce89ed4da09fe78fd79023
Parents: 2699265
Author: James Taylor 
Authored: Wed Oct 12 16:11:26 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 16:41:01 2016 -0700

--
 .../phoenix/compile/QueryCompilerTest.java  | 64 +++-
 1 file changed, 63 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/9b851d5c/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
index 7697d8c..2439ac9 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/QueryCompilerTest.java
@@ -457,6 +457,29 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 return plan.getContext().getScan();
 }
 
+private QueryPlan getQueryPlan(String query) throws SQLException {
+return getQueryPlan(query, Collections.emptyList());
+}
+
+private QueryPlan getOptimizedQueryPlan(String query) throws SQLException {
+return getOptimizedQueryPlan(query, Collections.emptyList());
+}
+
+private QueryPlan getOptimizedQueryPlan(String query, List binds) 
throws SQLException {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+try {
+PhoenixPreparedStatement statement = 
conn.prepareStatement(query).unwrap(PhoenixPreparedStatement.class);
+for (Object bind : binds) {
+statement.setObject(1, bind);
+}
+QueryPlan plan = statement.optimizeQuery(query);
+return plan;
+} finally {
+conn.close();
+}
+}
+
 private QueryPlan getQueryPlan(String query, List binds) throws 
SQLException {
 Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
 Connection conn = DriverManager.getConnection(getUrl(), props);
@@ -2263,7 +2286,7 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 try (Connection conn = DriverManager.getConnection(getUrl(), props);) {
 try {
 conn.createStatement().execute(
-"CREATE TABLE t (k VARCHAR NOT NULL PRIMARY 
KEY, v1 VARCHAR) GUIDE_POST_WIDTH = -1");
+"CREATE TABLE t (k VARCHAR NOT NULL PRIMARY KEY, v1 
VARCHAR) GUIDE_POSTS_WIDTH = -1");
 fail();
 } catch (SQLException e) {
 assertEquals("Unexpected Exception",
@@ -2443,4 +2466,43 @@ public class QueryCompilerTest extends 
BaseConnectionlessQueryTest {
 conn.close();
 }
 }
+
+@Test
+public void testIndexOnViewWithChildView() throws SQLException {
+try (Connection conn = DriverManager.getConnection(getUrl())) {
+conn.createStatement().execute("CREATE TABLE 
PLATFORM_ENTITY.GLOBAL_TABLE (\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"KEY_PREFIX CHAR(3) NOT NULL,\n" + 
+"CREATED_DATE DATE,\n" + 
+"CREATED_BY CHAR(15),\n" + 
+"CONSTRAINT PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"KEY_PREFIX\n" + 
+")\n" + 
+") VERSIONS=1, IMMUTABLE_ROWS=true, MULTI_TENANT=true");
+conn.createStatement().execute("CREATE VIEW 
PLATFORM_ENTITY.GLOBAL_VIEW  (\n" + 
+"INT1 BIGINT NOT NULL,\n" + 
+"DOUBLE1 DECIMAL(12, 3),\n" + 
+"IS_BOOLEAN BOOLEAN,\n" + 
+"TEXT1 VARCHAR,\n" + 
+"CONSTRAINT PKVIEW PRIMARY KEY\n" + 
+"(\n" + 
+"INT1\n" + 
+")\n" + 
+")\n" + 
+"AS SELECT * FROM PLATFORM_ENTITY.GLOBAL_TABLE WHERE 
KEY_PREFIX = '123'");
+conn.createStatement().execute("CREATE INDEX GLOBAL_INDEX\n" + 
+   

[1/4] phoenix git commit: PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK columns returns incorrect results

2016-10-25 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 2699265c7 -> 0dc0d7988


PHOENIX-3382 Query using Row Value Constructor comprised of non leading PK 
columns returns incorrect results


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 0dc0d7988ba7d9ecc2a74780bd64bf162f75bee5
Parents: 6027ee8
Author: James Taylor 
Authored: Sat Oct 15 17:05:21 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 16:41:01 2016 -0700

--
 .../org/apache/phoenix/end2end/QueryMoreIT.java | 103 +++
 .../apache/phoenix/compile/WhereOptimizer.java  |   4 +
 .../phoenix/compile/WhereOptimizerTest.java |  61 +++
 3 files changed, 168 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/0dc0d798/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
index 041e96d..b9162de 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/QueryMoreIT.java
@@ -368,4 +368,107 @@ public class QueryMoreIT extends ParallelStatsDisabledIT {
 assertNull(rs.getBigDecimal(2, 10));
 }
 }
+
+// FIXME: this repros PHOENIX-3382, but turned up two more issues:
+// 1) PHOENIX-3383 Comparison between descending row keys used in RVC is 
reverse
+// 2) PHOENIX-3384 Optimize RVC expressions for non leading row key columns
+@Test
+public void testRVCOnDescWithLeadingPKEquality() throws Exception {
+final Connection conn = DriverManager.getConnection(getUrl());
+String fullTableName = generateUniqueName();
+try (Statement stmt = conn.createStatement()) {
+stmt.execute("CREATE TABLE " + fullTableName + "(\n" + 
+"ORGANIZATION_ID CHAR(15) NOT NULL,\n" + 
+"SCORE DOUBLE NOT NULL,\n" + 
+"ENTITY_ID CHAR(15) NOT NULL\n" + 
+"CONSTRAINT PAGE_SNAPSHOT_PK PRIMARY KEY (\n" + 
+"ORGANIZATION_ID,\n" + 
+"SCORE DESC,\n" + 
+"ENTITY_ID DESC\n" + 
+")\n" + 
+") MULTI_TENANT=TRUE");
+}
+
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',3,'01')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'04')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',2,'03')");
+conn.createStatement().execute("UPSERT INTO " + fullTableName + " 
VALUES ('org1',1,'02')");
+conn.commit();
+
+// FIXME: PHOENIX-3383
+// This comparison is really backwards: it should be (score, 
entity_id) < (2, '04'),
+// but because we're matching a descending key, our comparison has to 
be switched.
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (score, entity_id) > (2, '04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);
+assertTrue(rs.next());
+assertEquals("02", rs.getString(1));
+assertEquals(1.0, rs.getDouble(2), 0.001);
+assertFalse(rs.next());
+}
+// FIXME: PHOENIX-3384
+// It should not be necessary to specify organization_id in this query
+try (Statement stmt = conn.createStatement()) {
+final ResultSet rs = stmt.executeQuery("SELECT entity_id, score\n" 
+ 
+"FROM " + fullTableName + "\n" + 
+"WHERE organization_id = 'org1'\n" + 
+"AND (organization_id, score, entity_id) > ('org1', 2, 
'04')\n" + 
+"ORDER BY score DESC, entity_id DESC\n" + 
+"LIMIT 3");
+assertTrue(rs.next());
+assertEquals("03", rs.getString(1));
+assertEquals(2.0, rs.getDouble(2), 0.001);

[2/4] phoenix git commit: PHOENIX-3371 Aggregate Function is broken if secondary index exists

2016-10-25 Thread jamestaylor
PHOENIX-3371 Aggregate Function is broken if secondary index exists


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

Branch: refs/heads/4.x-HBase-0.98
Commit: c40fa013b14bd6f41d8a4b0d2f18e4d918aeb0c6
Parents: 9b851d5
Author: James Taylor 
Authored: Wed Oct 12 19:14:55 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 16:41:01 2016 -0700

--
 .../phoenix/end2end/index/ViewIndexIT.java  | 97 
 .../apache/phoenix/schema/MetaDataClient.java   |  7 +-
 2 files changed, 99 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c40fa013/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
index 9e63093..99c8d2b 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ViewIndexIT.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.end2end.index;
 
 import static org.apache.phoenix.util.MetaDataUtil.getViewIndexSequenceName;
 import static 
org.apache.phoenix.util.MetaDataUtil.getViewIndexSequenceSchemaName;
+import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -34,6 +35,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
+import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.phoenix.compile.QueryPlan;
 import org.apache.phoenix.end2end.ParallelStatsDisabledIT;
 import org.apache.phoenix.jdbc.PhoenixDatabaseMetaData;
@@ -42,6 +44,8 @@ import org.apache.phoenix.query.KeyRange;
 import org.apache.phoenix.query.QueryServices;
 import org.apache.phoenix.schema.PNameFactory;
 import org.apache.phoenix.schema.PTableType;
+import org.apache.phoenix.util.MetaDataUtil;
+import org.apache.phoenix.util.PhoenixRuntime;
 import org.apache.phoenix.util.PropertiesUtil;
 import org.apache.phoenix.util.QueryUtil;
 import org.apache.phoenix.util.SchemaUtil;
@@ -284,4 +288,97 @@ public class ViewIndexIT extends ParallelStatsDisabledIT {
 assertEquals(6, plan.getSplits().size());
 }
 }
+
+private void assertRowCount(Connection conn, String fullTableName, String 
fullBaseName, int expectedCount) throws SQLException {
+PhoenixStatement stmt = 
conn.createStatement().unwrap(PhoenixStatement.class);
+ResultSet rs = stmt.executeQuery("SELECT COUNT(*) FROM " + 
fullTableName);
+assertTrue(rs.next());
+assertEquals(expectedCount, rs.getInt(1));
+// Ensure that index is being used
+rs = stmt.executeQuery("EXPLAIN SELECT COUNT(*) FROM " + 
fullTableName);
+// Uses index and finds correct number of rows
+assertEquals("CLIENT PARALLEL 1-WAY RANGE SCAN OVER " + 
Bytes.toString(MetaDataUtil.getViewIndexPhysicalName(Bytes.toBytes(fullBaseName)))
 + " [-32768,'123451234512345']\n" + 
+"SERVER FILTER BY FIRST KEY ONLY\n" + 
+"SERVER AGGREGATE INTO SINGLE ROW",
+QueryUtil.getExplainPlan(rs));
+
+// Force it not to use index and still finds correct number of rows
+rs = stmt.executeQuery("SELECT /*+ NO_INDEX */ * FROM " + 
fullTableName);
+int count = 0;
+while (rs.next()) {
+count++;
+}
+
+assertEquals(expectedCount, count);
+// Ensure that the table, not index is being used
+assertEquals(fullTableName, 
stmt.getQueryPlan().getContext().getCurrentTable().getTable().getName().getString());
+}
+
+@Test
+public void testUpdateOnTenantViewWithGlobalView() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+String baseSchemaName = "PLATFORM_ENTITY";
+String baseTableName = generateUniqueName();
+String baseFullName = SchemaUtil.getTableName(baseSchemaName, 
baseTableName);
+String viewTableName = "V_" + generateUniqueName();
+String viewFullName = SchemaUtil.getTableName(baseSchemaName, 
viewTableName);
+String indexName = "I_" + generateUniqueName();
+String tsViewTableName = "TSV_" + generateUniqueName();
+String tsViewFullName = 

[3/4] phoenix git commit: PHOENIX-3328 Optimize ORed leading pk column range comparisions to SkipScan (William Yang)

2016-10-25 Thread jamestaylor
PHOENIX-3328 Optimize ORed leading pk column range comparisions to SkipScan 
(William Yang)


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 6027ee8efe53658ba3fd3e234876e2e6f89b8468
Parents: c40fa01
Author: James Taylor 
Authored: Sat Oct 15 15:19:47 2016 -0700
Committer: James Taylor 
Committed: Tue Oct 25 16:41:01 2016 -0700

--
 .../apache/phoenix/compile/WhereOptimizer.java  | 23 -
 .../phoenix/compile/WhereOptimizerTest.java | 53 
 .../java/org/apache/phoenix/util/TestUtil.java  |  7 +++
 3 files changed, 81 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/6027ee8e/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
index f49aa52..f15a251 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
@@ -750,12 +750,31 @@ public class WhereOptimizer {
}
 }
 } else {
+boolean hasFirstSlot = true;
+boolean prevIsNull = false;
 // TODO: Do the same optimization that we do for IN if the 
childSlots specify a fully qualified row key
 for (KeySlot slot : childSlot) {
-// We have a nested OR with nothing for this slot, so 
continue
+if (hasFirstSlot) {
+// if the first slot is null, return null 
immediately
+if (slot == null) {
+return null;
+}
+// mark that we've handled the first slot
+hasFirstSlot = false;
+}
+
+// now if current slot is the first one, it must not 
be null
+// if not the first, then it might be null, so check 
if all the rest are null
 if (slot == null) {
-return null; //If one childSlot does not have the 
PK columns, let Phoenix scan all the key ranges of the table. 
+prevIsNull = true;
+continue;
+} else {
+// current slot is not null but prev one is null, 
cannot OR these together (PHOENIX-3328)
+if (prevIsNull) {
+return null;
+}
 }
+
 /*
  * If we see a different PK column than before, we 
can't
  * optimize it because our SkipScanFilter only handles

http://git-wip-us.apache.org/repos/asf/phoenix/blob/6027ee8e/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
--
diff --git 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
index 8b668a1..34beb59 100644
--- 
a/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
+++ 
b/phoenix-core/src/test/java/org/apache/phoenix/compile/WhereOptimizerTest.java
@@ -19,6 +19,7 @@ package org.apache.phoenix.compile;
 
 import static org.apache.phoenix.query.QueryConstants.MILLIS_IN_DAY;
 import static org.apache.phoenix.util.TestUtil.BINARY_NAME;
+import static org.apache.phoenix.util.TestUtil.BTABLE_NAME;
 import static org.apache.phoenix.util.TestUtil.TEST_PROPERTIES;
 import static org.apache.phoenix.util.TestUtil.assertDegenerate;
 import static org.apache.phoenix.util.TestUtil.assertEmptyScanKey;
@@ -28,6 +29,7 @@ import static org.apache.phoenix.util.TestUtil.rowKeyFilter;
 import static org.apache.phoenix.util.TestUtil.substr;
 import static org.junit.Assert.assertArrayEquals;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
@@ -38,6 +40,7 @@ import java.sql.Connection;
 import java.sql.Date;
 import 

Build failed in Jenkins: Phoenix Compile Level Compatibility with HBase #92

2016-10-25 Thread Apache Jenkins Server
See 

--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on ubuntu-2 (Ubuntu yahoo-not-h2 ubuntu docker) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/hudson7085316120623095530.sh
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 386178
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 6
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 10240
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited
core id : 0
core id : 1
core id : 10
core id : 9
physical id : 0
physical id : 1
MemTotal:   49453336 kB
MemFree: 7460376 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 24G   12K   24G   1% /dev
tmpfs   4.8G  748K  4.8G   1% /run
/dev/dm-0   3.6T  807G  2.6T  24% /
none4.0K 0  4.0K   0% /sys/fs/cgroup
none5.0M 0  5.0M   0% /run/lock
none 24G  108K   24G   1% /run/shm
none100M 0  100M   0% /run/user
/dev/sda2   237M  107M  118M  48% /boot
none3.6T  807G  2.6T  24% 
/var/lib/docker/aufs/mnt/7b4b55f416ee265e742bd595d384c4ef35939cd78f6c200fc9abb1a3c47c7bb8
apache-maven-2.2.1
apache-maven-3.0.4
apache-maven-3.0.5
apache-maven-3.2.1
apache-maven-3.2.5
apache-maven-3.3.3
apache-maven-3.3.9
latest
latest2
latest3


===
Verifying compile level compatibility with HBase 0.98 with Phoenix 
4.x-HBase-0.98
===

Cloning into 'hbase'...
Switched to a new branch '0.98'
Branch 0.98 set up to track remote branch 0.98 from origin.

main:
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common
 [exec] 
~/jenkins-slave/workspace/Phoenix_Compile_Compat_wHBase/hbase/hbase-common

main:
[mkdir] Created dir: 

 [exec] tar: hadoop-snappy-nativelibs.tar: Cannot open: No such file or 
directory
 [exec] tar: Error is not recoverable: exiting now
 [exec] Result: 2

main:
[mkdir] Created dir: 

 [copy] Copying 20 files to 

[mkdir] Created dir: 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 17 files to 

[mkdir] Created dir: 


main:
[mkdir] Created dir: 

 [copy] Copying 1 file to 

[mkdir] Created dir: 


HBase pom.xml:

Got HBase version as 0.98.23
Cloning into 'phoenix'...
Switched to a new branch '4.x-HBase-0.98'
Branch 4.x-HBase-0.98 set up to track remote branch 4.x-HBase-0.98 from origin.
ANTLR Parser Generator  Version 3.5.2
Output file 

 does not exist: must build 

PhoenixSQL.g


===
Verifying 

Apache Phoenix - Timeout crawler - Build https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1345/

2016-10-25 Thread Apache Jenkins Server
[...truncated 42 lines...]
Looking at the log, list of test(s) that timed-out:

Build:
https://builds.apache.org/job/Phoenix-4.x-HBase-0.98/1345/


Affected test class(es):
Set(['org.apache.phoenix.end2end.IndexExtendedIT'])


Build step 'Execute shell' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any