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

2017-10-16 Thread Apache Jenkins Server
See 




phoenix git commit: PHOENIX-4283 fix a coearceByte issue which causes nested group by big int incorrect

2017-10-16 Thread ewang
Repository: phoenix
Updated Branches:
  refs/heads/master ff803 -> bab06d688


PHOENIX-4283 fix a coearceByte issue which causes nested group by big int 
incorrect

Signed-off-by: aertoria 


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

Branch: refs/heads/master
Commit: bab06d688acde9801ae171420f94871b8e78684f
Parents: ff80555
Author: aertoria 
Authored: Sun Oct 15 18:36:44 2017 -0700
Committer: aertoria 
Committed: Mon Oct 16 11:13:34 2017 -0700

--
 .../org/apache/phoenix/end2end/AggregateIT.java | 21 +++-
 .../org/apache/phoenix/schema/types/PLong.java  |  3 ++-
 2 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/bab06d68/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
index bde9b9d..09e51c5 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
@@ -939,7 +939,26 @@ public class AggregateIT extends ParallelStatsDisabledIT {
 public void testCountNullInNonEncodedNonEmptyKeyValueCF() throws Exception 
{
 testCountNullInNonEmptyKeyValueCF(0);
 }
-
+
+@Test
+public void testNestedGroupedAggregationWithBigInt() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String tableName = generateUniqueName();
+try(Connection conn = DriverManager.getConnection(getUrl(), props);) {
+String createQuery="CREATE TABLE "+tableName+" (a BIGINT NOT 
NULL,c BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a, c))";
+String updateQuery="UPSERT INTO "+tableName+"(a,c) 
VALUES(444, 555)";
+String query="SELECT a FROM (SELECT a, c FROM "+tableName+" GROUP 
BY a, c) GROUP BY a, c";
+conn.prepareStatement(createQuery).execute();
+conn.prepareStatement(updateQuery).execute();
+conn.commit();
+PreparedStatement statement = conn.prepareStatement(query);
+ResultSet rs = statement.executeQuery();
+assertTrue(rs.next());
+assertEquals(444L,rs.getLong(1));
+assertFalse(rs.next());
+}
+}
+
 private void testCountNullInNonEmptyKeyValueCF(int columnEncodedBytes) 
throws Exception {
 try (Connection conn = DriverManager.getConnection(getUrl())) {
 //Type is INT

http://git-wip-us.apache.org/repos/asf/phoenix/blob/bab06d68/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
index 0402c6e..acd16c5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
@@ -133,8 +133,9 @@ public class PLong extends PWholeNumber {
 public void coerceBytes(ImmutableBytesWritable ptr, Object object, 
PDataType actualType,
 Integer maxLength, Integer scale, SortOrder actualModifier, 
Integer desiredMaxLength, Integer desiredScale,
 SortOrder expectedModifier) {
+
 // Decrease size of TIMESTAMP to size of LONG and continue coerce
-if (ptr.getLength() > getByteSize()) {
+if (ptr.getLength() > getByteSize() && 
actualType.isCoercibleTo(PTimestamp.INSTANCE)) {
 ptr.set(ptr.get(), ptr.getOffset(), getByteSize());
 }
 super.coerceBytes(ptr, object, actualType, maxLength, scale, 
actualModifier, desiredMaxLength,



phoenix git commit: PHOENIX-4283 fix a coearceByte issue which causes nested group by big int incorrect

2017-10-16 Thread ewang
Repository: phoenix
Updated Branches:
  refs/heads/4.12-HBase-0.98 eb51d4023 -> a6b062b48


PHOENIX-4283 fix a coearceByte issue which causes nested group by big int 
incorrect

Signed-off-by: aertoria 


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

Branch: refs/heads/4.12-HBase-0.98
Commit: a6b062b48d71616319658b0044e3943125db86ec
Parents: eb51d40
Author: aertoria 
Authored: Sun Oct 15 18:36:44 2017 -0700
Committer: aertoria 
Committed: Mon Oct 16 11:17:33 2017 -0700

--
 .../org/apache/phoenix/end2end/AggregateIT.java | 21 +++-
 .../org/apache/phoenix/schema/types/PLong.java  |  3 ++-
 2 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6b062b4/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
index 67a468a..3d0e590 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
@@ -936,7 +936,26 @@ public class AggregateIT extends ParallelStatsDisabledIT {
 public void testCountNullInNonEncodedNonEmptyKeyValueCF() throws Exception 
{
 testCountNullInNonEmptyKeyValueCF(0);
 }
-
+
+@Test
+public void testNestedGroupedAggregationWithBigInt() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String tableName = generateUniqueName();
+try(Connection conn = DriverManager.getConnection(getUrl(), props);) {
+String createQuery="CREATE TABLE "+tableName+" (a BIGINT NOT 
NULL,c BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a, c))";
+String updateQuery="UPSERT INTO "+tableName+"(a,c) 
VALUES(444, 555)";
+String query="SELECT a FROM (SELECT a, c FROM "+tableName+" GROUP 
BY a, c) GROUP BY a, c";
+conn.prepareStatement(createQuery).execute();
+conn.prepareStatement(updateQuery).execute();
+conn.commit();
+PreparedStatement statement = conn.prepareStatement(query);
+ResultSet rs = statement.executeQuery();
+assertTrue(rs.next());
+assertEquals(444L,rs.getLong(1));
+assertFalse(rs.next());
+}
+}
+
 private void testCountNullInNonEmptyKeyValueCF(int columnEncodedBytes) 
throws Exception {
 try (Connection conn = DriverManager.getConnection(getUrl())) {
 //Type is INT

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a6b062b4/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
index 0402c6e..acd16c5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
@@ -133,8 +133,9 @@ public class PLong extends PWholeNumber {
 public void coerceBytes(ImmutableBytesWritable ptr, Object object, 
PDataType actualType,
 Integer maxLength, Integer scale, SortOrder actualModifier, 
Integer desiredMaxLength, Integer desiredScale,
 SortOrder expectedModifier) {
+
 // Decrease size of TIMESTAMP to size of LONG and continue coerce
-if (ptr.getLength() > getByteSize()) {
+if (ptr.getLength() > getByteSize() && 
actualType.isCoercibleTo(PTimestamp.INSTANCE)) {
 ptr.set(ptr.get(), ptr.getOffset(), getByteSize());
 }
 super.coerceBytes(ptr, object, actualType, maxLength, scale, 
actualModifier, desiredMaxLength,



phoenix git commit: PHOENIX-4283 fix a coearceByte issue which causes nested group by big int incorrect

2017-10-16 Thread ewang
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 fe8c738e4 -> a9d724216


PHOENIX-4283 fix a coearceByte issue which causes nested group by big int 
incorrect

Signed-off-by: aertoria 


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

Branch: refs/heads/4.x-HBase-0.98
Commit: a9d724216d2c3d3384bf10a28934abdd52550c6f
Parents: fe8c738
Author: aertoria 
Authored: Sun Oct 15 18:36:44 2017 -0700
Committer: aertoria 
Committed: Mon Oct 16 11:18:58 2017 -0700

--
 .../org/apache/phoenix/end2end/AggregateIT.java | 21 +++-
 .../org/apache/phoenix/schema/types/PLong.java  |  3 ++-
 2 files changed, 22 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9d72421/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
index 67a468a..3d0e590 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/AggregateIT.java
@@ -936,7 +936,26 @@ public class AggregateIT extends ParallelStatsDisabledIT {
 public void testCountNullInNonEncodedNonEmptyKeyValueCF() throws Exception 
{
 testCountNullInNonEmptyKeyValueCF(0);
 }
-
+
+@Test
+public void testNestedGroupedAggregationWithBigInt() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+String tableName = generateUniqueName();
+try(Connection conn = DriverManager.getConnection(getUrl(), props);) {
+String createQuery="CREATE TABLE "+tableName+" (a BIGINT NOT 
NULL,c BIGINT NOT NULL CONSTRAINT PK PRIMARY KEY (a, c))";
+String updateQuery="UPSERT INTO "+tableName+"(a,c) 
VALUES(444, 555)";
+String query="SELECT a FROM (SELECT a, c FROM "+tableName+" GROUP 
BY a, c) GROUP BY a, c";
+conn.prepareStatement(createQuery).execute();
+conn.prepareStatement(updateQuery).execute();
+conn.commit();
+PreparedStatement statement = conn.prepareStatement(query);
+ResultSet rs = statement.executeQuery();
+assertTrue(rs.next());
+assertEquals(444L,rs.getLong(1));
+assertFalse(rs.next());
+}
+}
+
 private void testCountNullInNonEmptyKeyValueCF(int columnEncodedBytes) 
throws Exception {
 try (Connection conn = DriverManager.getConnection(getUrl())) {
 //Type is INT

http://git-wip-us.apache.org/repos/asf/phoenix/blob/a9d72421/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java 
b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
index 0402c6e..acd16c5 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/schema/types/PLong.java
@@ -133,8 +133,9 @@ public class PLong extends PWholeNumber {
 public void coerceBytes(ImmutableBytesWritable ptr, Object object, 
PDataType actualType,
 Integer maxLength, Integer scale, SortOrder actualModifier, 
Integer desiredMaxLength, Integer desiredScale,
 SortOrder expectedModifier) {
+
 // Decrease size of TIMESTAMP to size of LONG and continue coerce
-if (ptr.getLength() > getByteSize()) {
+if (ptr.getLength() > getByteSize() && 
actualType.isCoercibleTo(PTimestamp.INSTANCE)) {
 ptr.set(ptr.get(), ptr.getOffset(), getByteSize());
 }
 super.coerceBytes(ptr, object, actualType, maxLength, scale, 
actualModifier, desiredMaxLength,



Build failed in Jenkins: Phoenix Compile Compatibility with HBase #435

2017-10-16 Thread Apache Jenkins Server
See 


--
Started by timer
[EnvInject] - Loading node environment variables.
Building remotely on H25 (couchdbtest ubuntu xenial) in workspace 

[Phoenix_Compile_Compat_wHBase] $ /bin/bash /tmp/jenkins4399286744433750224.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) 386417
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 : 2
core id : 3
core id : 4
core id : 5
physical id : 0
physical id : 1
MemTotal:   98958120 kB
MemFree:18511816 kB
Filesystem  Size  Used Avail Use% Mounted on
udev 48G 0   48G   0% /dev
tmpfs   9.5G  930M  8.6G  10% /run
/dev/sda1   364G  165G  181G  48% /
tmpfs48G  516K   48G   1% /dev/shm
tmpfs   5.0M 0  5.0M   0% /run/lock
tmpfs48G 0   48G   0% /sys/fs/cgroup
tmpfs   9.5G 0  9.5G   0% /run/user/10025
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
apache-maven-3.5.0
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.25-SNAPSHOT
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 compile level compatibility with HBase branch-1.3 with Phoenix master
=