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

2016-02-18 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

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

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

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

Changes
[jtaylor] PHOENIX-2691 Exception while unpacking resultset containing VARCHAR

[jtaylor] PHOENIX-2666 Performance regression: Aggregate query with filter on



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 | Master #1145

2016-02-18 Thread Apache Jenkins Server
See 

Changes:

[jtaylor] PHOENIX-2691 Exception while unpacking resultset containing VARCHAR

[jtaylor] PHOENIX-2666 Performance regression: Aggregate query with filter on

--
[...truncated 15736 lines...]
Downloading: 
http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.3.5/plexus-io-2.3.5.jar
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-repository-builder/1.0/maven-repository-builder-1.0.jar
4/143 KB   
8/143 KB   
12/143 KB   
16/143 KB   
20/143 KB   
24/143 KB   
28/143 KB   
32/143 KB   
36/143 KB   
40/143 KB   
44/143 KB   
48/143 KB   
52/143 KB   
56/143 KB   
60/143 KB   
64/143 KB   
68/143 KB   
72/143 KB   
76/143 KB   
80/143 KB   
84/143 KB   
88/143 KB   
92/143 KB   4/78 KB   
92/143 KB   4/78 KB   
96/143 KB   4/78 KB   
100/143 KB   4/78 KB   
100/143 KB   8/78 KB   
104/143 KB   8/78 KB   
104/143 KB   12/78 KB   
108/143 KB   12/78 KB   
108/143 KB   16/78 KB   
112/143 KB   16/78 KB   
112/143 KB   20/78 KB   
116/143 KB   20/78 KB   
116/143 KB   24/78 KB   
120/143 KB   24/78 KB   
120/143 KB   28/78 KB   
124/143 KB   28/78 KB   
124/143 KB   32/78 KB   
128/143 KB   32/78 KB   
128/143 KB   36/78 KB   
128/143 KB   40/78 KB   
128/143 KB   44/78 KB   
132/143 KB   44/78 KB   
132/143 KB   48/78 KB   
136/143 KB   48/78 KB   
136/143 KB   52/78 KB   
140/143 KB   52/78 KB   
140/143 KB   56/78 KB   
143/143 KB   56/78 KB   
143/143 KB   60/78 KB   
143/143 KB   64/78 KB   
143/143 KB   68/78 KB   
143/143 KB   72/78 KB   
143/143 KB   76/78 KB   
143/143 KB   78/78 KB   
143/143 KB   4/22 KB   78/78 KB   
143/143 KB   8/22 KB   78/78 KB   
143/143 KB   12/22 KB   78/78 KB   
143/143 KB   16/22 KB   78/78 KB   
143/143 KB   20/22 KB   78/78 KB   
143/143 KB   22/22 KB   78/78 KB   
143/143 KB   22/22 KB   4/50 KB   78/78 KB   
143/143 KB   22/22 KB   8/50 KB   78/78 KB   
143/143 KB   22/22 KB   12/50 KB   78/78 KB   
143/143 KB   22/22 KB   16/50 KB   78/78 KB   
143/143 KB   22/22 KB   20/50 KB   78/78 KB   
143/143 KB   22/22 KB   24/50 KB   78/78 KB   
143/143 KB   22/22 KB   28/50 KB   78/78 KB   
143/143 KB   22/22 KB   32/50 KB   78/78 KB   
143/143 KB   22/22 KB   36/50 KB   78/78 KB   
143/143 KB   22/22 KB   40/50 KB   78/78 KB   
143/143 KB   22/22 KB   44/50 KB   78/78 KB   
143/143 KB   22/22 KB   48/50 KB   78/78 KB   
143/143 KB   22/22 KB   50/50 KB   78/78 KB   
  
Downloaded: 
http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-io/2.3.5/plexus-io-2.3.5.jar
 (78 KB at 986.6 KB/sec)
  
Downloaded: 
http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-archiver/2.8.4/plexus-archiver-2.8.4.jar
 (143 KB at 1755.6 KB/sec)
  
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-repository-builder/1.0/maven-repository-builder-1.0.jar
 (22 KB at 280.3 KB/sec)
  
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-filtering/1.3/maven-filtering-1.3.jar
 (50 KB at 602.2 KB/sec)
[INFO] Reading assembly descriptor: src/build/phoenix-core.xml
[WARNING] Artifact: org.apache.phoenix:phoenix-core:jar:4.7.0-HBase-1.1 
references the same file as the assembly destination file. Moving it to a 
temporary location for inclusion.
[INFO] Building jar: 

[INFO] 
[INFO] --- maven-failsafe-plugin:2.19.1:integration-test 
(ClientManagedTimeTests) @ phoenix-core ---
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit47/2.19.1/surefire-junit47-2.19.1.pom
4/7 KB
7/7 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit47/2.19.1/surefire-junit47-2.19.1.pom
 (7 KB at 79.1 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit48/2.19.1/common-junit48-2.19.1.pom
4/4 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit48/2.19.1/common-junit48-2.19.1.pom
 (4 KB at 38.6 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/2.19.1/common-junit4-2.19.1.pom
3/3 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit4/2.19.1/common-junit4-2.19.1.pom
 (3 KB at 27.4 KB/sec)
Downloading: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit3/2.19.1/common-junit3-2.19.1.pom
2/2 KB   
 
Downloaded: 
http://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-junit3/2.19.1/common-junit3-2.19.1.pom
 (2 KB at 20.3 KB/sec)
Downloading: 

[2/2] phoenix git commit: PHOENIX-2666 Performance regression: Aggregate query with filter on table with multiple column families

2016-02-18 Thread jamestaylor
PHOENIX-2666 Performance regression: Aggregate query with filter on table with 
multiple column families


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

Branch: refs/heads/4.x-HBase-1.0
Commit: aa362e744512d1e054eb441441d06d2fe58d9efb
Parents: 264c870
Author: James Taylor 
Authored: Thu Feb 18 22:16:51 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 22:28:11 2016 -0800

--
 .../org/apache/phoenix/end2end/DeleteIT.java|   3 +-
 .../StatsCollectorWithSplitsAndMultiCFIT.java   |   3 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   6 +-
 .../apache/phoenix/compile/UpsertCompiler.java  |   7 +-
 .../phoenix/filter/ColumnProjectionFilter.java  |   2 +
 .../phoenix/iterate/BaseResultIterators.java| 232 +++
 .../apache/phoenix/iterate/ExplainTable.java|  28 +--
 .../phoenix/compile/QueryCompilerTest.java  |  29 +++
 8 files changed, 189 insertions(+), 121 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/aa362e74/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index 745c730..6b4eead 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -205,7 +205,8 @@ public class DeleteIT extends BaseHBaseManagedTimeIT {
 deleteStmt = "DELETE FROM IntIntKeyTest WHERE j IS NULL";
 stmt = conn.prepareStatement(deleteStmt);
 assertIndexUsed(conn, deleteStmt, indexName, createIndex);
-stmt.execute();
+int deleteCount = stmt.executeUpdate();
+assertEquals(3, deleteCount);
 if (!autoCommit) {
 conn.commit();
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/aa362e74/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
index 13cd54c..d922ad9 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
@@ -111,10 +111,9 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends 
StatsCollectorAbstract
 
 rs = conn.createStatement().executeQuery(
 "SELECT 
COLUMN_FAMILY,SUM(GUIDE_POSTS_ROW_COUNT),SUM(GUIDE_POSTS_WIDTH),COUNT(*) from 
SYSTEM.STATS where PHYSICAL_NAME = '"
-+ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY");
++ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY ORDER BY COLUMN_FAMILY");
 
 assertTrue(rs.next());
-assertTrue(rs.next());
 assertEquals("A", rs.getString(1));
 assertEquals(25, rs.getInt(2));
 assertEquals(12420, rs.getInt(3));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/aa362e74/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 4c41f82..8e9e1de 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -508,7 +508,11 @@ public class DeleteCompiler {
 // The coprocessor will delete each row returned from the scan
 // Ignoring ORDER BY, since with auto commit on and no limit 
makes no difference
 SelectStatement aggSelect = 
SelectStatement.create(SelectStatement.COUNT_ONE, delete.getHint());
-final RowProjector projector = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+RowProjector projectorToBe = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+if (plan.getProjector().projectEveryRow()) {
+projectorToBe = new RowProjector(projectorToBe,true);
+}
+final RowProjector projector = 

[1/2] phoenix git commit: PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of unspecified length

2016-02-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 699362488 -> aa362e744


PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of 
unspecified length


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 264c8700595ef440d6de11933386df8e42e8bd4b
Parents: 6993624
Author: James Taylor 
Authored: Thu Feb 18 14:59:29 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 22:28:06 2016 -0800

--
 .../apache/phoenix/end2end/GroupByCaseIT.java   | 35 +
 .../apache/phoenix/compile/GroupByCompiler.java | 74 
 .../phoenix/exception/SQLExceptionCode.java |  5 +-
 .../java/org/apache/phoenix/util/IndexUtil.java |  6 +-
 .../phoenix/compile/QueryCompilerTest.java  | 36 ++
 5 files changed, 122 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/264c8700/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
index 0f1568c..172f9f7 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
@@ -226,4 +226,39 @@ public class GroupByCaseIT extends BaseHBaseManagedTimeIT {
 conn.close();
 }
 
+
+@Test
+public void testGroupByArray() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE test1(\n" + 
+"  a VARCHAR NOT NULL,\n" + 
+"  b VARCHAR,\n" + 
+"  c INTEGER,\n" + 
+"  d VARCHAR,\n" + 
+"  e VARCHAR ARRAY,\n" + 
+"  f BIGINT,\n" + 
+"  g BIGINT,\n" + 
+"  CONSTRAINT pk PRIMARY KEY(a)\n" + 
+")");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('1', 'val', 
100, 'a', ARRAY ['b'], 1, 2)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('2', 'val', 
100, 'a', ARRAY ['b'], 3, 4)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('3', 'val', 
100, 'a', ARRAY ['b','c'], 5, 6)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT c, SUM(f + 
g) AS sumone, d, e\n" + 
+"FROM test1\n" + 
+"WHERE b = 'val'\n" + 
+"  AND a IN ('1','2','3')\n" + 
+"GROUP BY c, d, e\n" + 
+"ORDER BY sumone DESC");
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(11, rs.getLong(2));
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(10, rs.getLong(2));
+assertFalse(rs.next());
+conn.close();
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/264c8700/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
index 7d9df02..85478bf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
@@ -38,8 +38,8 @@ import org.apache.phoenix.parse.SelectStatement;
 import org.apache.phoenix.schema.AmbiguousColumnException;
 import org.apache.phoenix.schema.ColumnNotFoundException;
 import org.apache.phoenix.schema.types.PDataType;
-import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.schema.types.PVarbinary;
+import org.apache.phoenix.util.IndexUtil;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -217,34 +217,53 @@ public class GroupByCompiler {
 public int compare(Pair gb1, 
Pair gb2) {
 Expression e1 = gb1.getSecond();
 Expression e2 = gb2.getSecond();
-boolean isFixed1 = e1.getDataType().isFixedWidth();
-boolean isFixed2 = 

[2/2] phoenix git commit: PHOENIX-2666 Performance regression: Aggregate query with filter on table with multiple column families

2016-02-18 Thread jamestaylor
PHOENIX-2666 Performance regression: Aggregate query with filter on table with 
multiple column families


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 972ceb5c33610a368f507ee4d42bea156b061bd2
Parents: 19141e9
Author: James Taylor 
Authored: Thu Feb 18 22:16:51 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 22:25:48 2016 -0800

--
 .../org/apache/phoenix/end2end/DeleteIT.java|   3 +-
 .../StatsCollectorWithSplitsAndMultiCFIT.java   |   3 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   6 +-
 .../apache/phoenix/compile/UpsertCompiler.java  |   7 +-
 .../phoenix/iterate/BaseResultIterators.java| 232 +++
 .../apache/phoenix/iterate/ExplainTable.java|  28 +--
 .../phoenix/compile/QueryCompilerTest.java  |  29 +++
 7 files changed, 187 insertions(+), 121 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/972ceb5c/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index 745c730..6b4eead 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -205,7 +205,8 @@ public class DeleteIT extends BaseHBaseManagedTimeIT {
 deleteStmt = "DELETE FROM IntIntKeyTest WHERE j IS NULL";
 stmt = conn.prepareStatement(deleteStmt);
 assertIndexUsed(conn, deleteStmt, indexName, createIndex);
-stmt.execute();
+int deleteCount = stmt.executeUpdate();
+assertEquals(3, deleteCount);
 if (!autoCommit) {
 conn.commit();
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/972ceb5c/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
index 13cd54c..d922ad9 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
@@ -111,10 +111,9 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends 
StatsCollectorAbstract
 
 rs = conn.createStatement().executeQuery(
 "SELECT 
COLUMN_FAMILY,SUM(GUIDE_POSTS_ROW_COUNT),SUM(GUIDE_POSTS_WIDTH),COUNT(*) from 
SYSTEM.STATS where PHYSICAL_NAME = '"
-+ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY");
++ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY ORDER BY COLUMN_FAMILY");
 
 assertTrue(rs.next());
-assertTrue(rs.next());
 assertEquals("A", rs.getString(1));
 assertEquals(25, rs.getInt(2));
 assertEquals(12420, rs.getInt(3));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/972ceb5c/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 4c41f82..8e9e1de 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -508,7 +508,11 @@ public class DeleteCompiler {
 // The coprocessor will delete each row returned from the scan
 // Ignoring ORDER BY, since with auto commit on and no limit 
makes no difference
 SelectStatement aggSelect = 
SelectStatement.create(SelectStatement.COUNT_ONE, delete.getHint());
-final RowProjector projector = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+RowProjector projectorToBe = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+if (plan.getProjector().projectEveryRow()) {
+projectorToBe = new RowProjector(projectorToBe,true);
+}
+final RowProjector projector = projectorToBe;
 final QueryPlan aggPlan = 

[1/2] phoenix git commit: PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of unspecified length

2016-02-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 acdb786eb -> 972ceb5c3


PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of 
unspecified length


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 19141e9367e43404e4fbaa92061f33487b3a86dd
Parents: acdb786
Author: James Taylor 
Authored: Thu Feb 18 14:59:29 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 22:25:24 2016 -0800

--
 .../apache/phoenix/end2end/GroupByCaseIT.java   | 35 +
 .../apache/phoenix/compile/GroupByCompiler.java | 74 
 .../phoenix/exception/SQLExceptionCode.java |  5 +-
 .../java/org/apache/phoenix/util/IndexUtil.java |  6 +-
 .../phoenix/compile/QueryCompilerTest.java  | 36 ++
 5 files changed, 122 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/19141e93/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
index 0f1568c..172f9f7 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
@@ -226,4 +226,39 @@ public class GroupByCaseIT extends BaseHBaseManagedTimeIT {
 conn.close();
 }
 
+
+@Test
+public void testGroupByArray() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE test1(\n" + 
+"  a VARCHAR NOT NULL,\n" + 
+"  b VARCHAR,\n" + 
+"  c INTEGER,\n" + 
+"  d VARCHAR,\n" + 
+"  e VARCHAR ARRAY,\n" + 
+"  f BIGINT,\n" + 
+"  g BIGINT,\n" + 
+"  CONSTRAINT pk PRIMARY KEY(a)\n" + 
+")");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('1', 'val', 
100, 'a', ARRAY ['b'], 1, 2)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('2', 'val', 
100, 'a', ARRAY ['b'], 3, 4)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('3', 'val', 
100, 'a', ARRAY ['b','c'], 5, 6)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT c, SUM(f + 
g) AS sumone, d, e\n" + 
+"FROM test1\n" + 
+"WHERE b = 'val'\n" + 
+"  AND a IN ('1','2','3')\n" + 
+"GROUP BY c, d, e\n" + 
+"ORDER BY sumone DESC");
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(11, rs.getLong(2));
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(10, rs.getLong(2));
+assertFalse(rs.next());
+conn.close();
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/19141e93/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
index 7d9df02..85478bf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
@@ -38,8 +38,8 @@ import org.apache.phoenix.parse.SelectStatement;
 import org.apache.phoenix.schema.AmbiguousColumnException;
 import org.apache.phoenix.schema.ColumnNotFoundException;
 import org.apache.phoenix.schema.types.PDataType;
-import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.schema.types.PVarbinary;
+import org.apache.phoenix.util.IndexUtil;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -217,34 +217,53 @@ public class GroupByCompiler {
 public int compare(Pair gb1, 
Pair gb2) {
 Expression e1 = gb1.getSecond();
 Expression e2 = gb2.getSecond();
-boolean isFixed1 = e1.getDataType().isFixedWidth();
-boolean isFixed2 = 

[1/2] phoenix git commit: PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of unspecified length

2016-02-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/master 45a9d670b -> 28a8b802c


PHOENIX-2691 Exception while unpacking resultset containing VARCHAR ARRAY of 
unspecified length


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

Branch: refs/heads/master
Commit: cac03056578170a82ba812aa4648e0e5b1a1bbb6
Parents: 45a9d67
Author: James Taylor 
Authored: Thu Feb 18 14:59:29 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 15:14:48 2016 -0800

--
 .../apache/phoenix/end2end/GroupByCaseIT.java   | 35 +
 .../apache/phoenix/compile/GroupByCompiler.java | 74 
 .../phoenix/exception/SQLExceptionCode.java |  5 +-
 .../java/org/apache/phoenix/util/IndexUtil.java |  6 +-
 .../phoenix/compile/QueryCompilerTest.java  | 36 ++
 5 files changed, 122 insertions(+), 34 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/cac03056/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
index 0f1568c..172f9f7 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/GroupByCaseIT.java
@@ -226,4 +226,39 @@ public class GroupByCaseIT extends BaseHBaseManagedTimeIT {
 conn.close();
 }
 
+
+@Test
+public void testGroupByArray() throws Exception {
+Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES);
+Connection conn = DriverManager.getConnection(getUrl(), props);
+conn.createStatement().execute("CREATE TABLE test1(\n" + 
+"  a VARCHAR NOT NULL,\n" + 
+"  b VARCHAR,\n" + 
+"  c INTEGER,\n" + 
+"  d VARCHAR,\n" + 
+"  e VARCHAR ARRAY,\n" + 
+"  f BIGINT,\n" + 
+"  g BIGINT,\n" + 
+"  CONSTRAINT pk PRIMARY KEY(a)\n" + 
+")");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('1', 'val', 
100, 'a', ARRAY ['b'], 1, 2)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('2', 'val', 
100, 'a', ARRAY ['b'], 3, 4)");
+conn.createStatement().execute("UPSERT INTO test1 VALUES('3', 'val', 
100, 'a', ARRAY ['b','c'], 5, 6)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT c, SUM(f + 
g) AS sumone, d, e\n" + 
+"FROM test1\n" + 
+"WHERE b = 'val'\n" + 
+"  AND a IN ('1','2','3')\n" + 
+"GROUP BY c, d, e\n" + 
+"ORDER BY sumone DESC");
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(11, rs.getLong(2));
+assertTrue(rs.next());
+assertEquals(100, rs.getInt(1));
+assertEquals(10, rs.getLong(2));
+assertFalse(rs.next());
+conn.close();
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/cac03056/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
index 7d9df02..85478bf 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/GroupByCompiler.java
@@ -38,8 +38,8 @@ import org.apache.phoenix.parse.SelectStatement;
 import org.apache.phoenix.schema.AmbiguousColumnException;
 import org.apache.phoenix.schema.ColumnNotFoundException;
 import org.apache.phoenix.schema.types.PDataType;
-import org.apache.phoenix.schema.types.PDecimal;
-import org.apache.phoenix.schema.types.PVarchar;
+import org.apache.phoenix.schema.types.PVarbinary;
+import org.apache.phoenix.util.IndexUtil;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -217,34 +217,53 @@ public class GroupByCompiler {
 public int compare(Pair gb1, 
Pair gb2) {
 Expression e1 = gb1.getSecond();
 Expression e2 = gb2.getSecond();
-boolean isFixed1 = e1.getDataType().isFixedWidth();
-boolean isFixed2 = 

[2/2] phoenix git commit: PHOENIX-2666 Performance regression: Aggregate query with filter on table with multiple column families

2016-02-18 Thread jamestaylor
PHOENIX-2666 Performance regression: Aggregate query with filter on table with 
multiple column families


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

Branch: refs/heads/master
Commit: 28a8b802c2a32f9735bf187f08ef0a9e33baf2dd
Parents: cac0305
Author: James Taylor 
Authored: Thu Feb 18 22:16:51 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 22:16:51 2016 -0800

--
 .../org/apache/phoenix/end2end/DeleteIT.java|   3 +-
 .../StatsCollectorWithSplitsAndMultiCFIT.java   |   3 +-
 .../apache/phoenix/compile/DeleteCompiler.java  |   6 +-
 .../apache/phoenix/compile/UpsertCompiler.java  |   7 +-
 .../phoenix/filter/ColumnProjectionFilter.java  |   2 +
 .../phoenix/iterate/BaseResultIterators.java| 232 +++
 .../apache/phoenix/iterate/ExplainTable.java|  28 +--
 .../phoenix/compile/QueryCompilerTest.java  |  29 +++
 8 files changed, 189 insertions(+), 121 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/28a8b802/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
--
diff --git a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
index 745c730..6b4eead 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/DeleteIT.java
@@ -205,7 +205,8 @@ public class DeleteIT extends BaseHBaseManagedTimeIT {
 deleteStmt = "DELETE FROM IntIntKeyTest WHERE j IS NULL";
 stmt = conn.prepareStatement(deleteStmt);
 assertIndexUsed(conn, deleteStmt, indexName, createIndex);
-stmt.execute();
+int deleteCount = stmt.executeUpdate();
+assertEquals(3, deleteCount);
 if (!autoCommit) {
 conn.commit();
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/28a8b802/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
index 13cd54c..d922ad9 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/StatsCollectorWithSplitsAndMultiCFIT.java
@@ -111,10 +111,9 @@ public class StatsCollectorWithSplitsAndMultiCFIT extends 
StatsCollectorAbstract
 
 rs = conn.createStatement().executeQuery(
 "SELECT 
COLUMN_FAMILY,SUM(GUIDE_POSTS_ROW_COUNT),SUM(GUIDE_POSTS_WIDTH),COUNT(*) from 
SYSTEM.STATS where PHYSICAL_NAME = '"
-+ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY");
++ STATS_TEST_TABLE_NAME_NEW + "' GROUP BY 
COLUMN_FAMILY ORDER BY COLUMN_FAMILY");
 
 assertTrue(rs.next());
-assertTrue(rs.next());
 assertEquals("A", rs.getString(1));
 assertEquals(25, rs.getInt(2));
 assertEquals(12420, rs.getInt(3));

http://git-wip-us.apache.org/repos/asf/phoenix/blob/28a8b802/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
--
diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java 
b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
index 4c41f82..8e9e1de 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/DeleteCompiler.java
@@ -508,7 +508,11 @@ public class DeleteCompiler {
 // The coprocessor will delete each row returned from the scan
 // Ignoring ORDER BY, since with auto commit on and no limit 
makes no difference
 SelectStatement aggSelect = 
SelectStatement.create(SelectStatement.COUNT_ONE, delete.getHint());
-final RowProjector projector = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+RowProjector projectorToBe = 
ProjectionCompiler.compile(context, aggSelect, GroupBy.EMPTY_GROUP_BY);
+if (plan.getProjector().projectEveryRow()) {
+projectorToBe = new RowProjector(projectorToBe,true);
+}
+final RowProjector projector = 

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

2016-02-18 Thread Apache Jenkins Server
4.x-HBase-1.0 branch build status Successful

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

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

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

Changes
[jtaylor] PHOENIX-2689 VARCHAR Field Not Working With String Concatenation



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


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

2016-02-18 Thread Apache Jenkins Server
4.x-HBase-0.98 branch build status Successful

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

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

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

Changes
[jtaylor] PHOENIX-2695 Update pom where possible to minimum version that supports

[jtaylor] PHOENIX-2689 VARCHAR Field Not Working With String Concatenation



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


Apache-Phoenix | Master | Build Successful

2016-02-18 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
[jtaylor] PHOENIX-2689 VARCHAR Field Not Working With String Concatenation



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


[2/2] phoenix git commit: PHOENIX-2689 VARCHAR Field Not Working With String Concatenation

2016-02-18 Thread jamestaylor
PHOENIX-2689 VARCHAR Field Not Working With String Concatenation


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

Branch: refs/heads/4.x-HBase-0.98
Commit: acdb786eb0cdba0566385650b700feb4c7941bc7
Parents: 68fc88a
Author: James Taylor 
Authored: Thu Feb 18 12:16:27 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 12:38:09 2016 -0800

--
 .../apache/phoenix/end2end/LpadFunctionIT.java  | 242 --
 .../org/apache/phoenix/end2end/StringIT.java| 254 +++
 .../expression/StringConcatExpression.java  |  21 +-
 3 files changed, 271 insertions(+), 246 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/acdb786e/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
deleted file mode 100644
index 4070103..000
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.phoenix.end2end;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.query.QueryConstants;
-import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.TestUtil;
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-
-/**
- * Tests for the LPAD built-in function.
- */
-
-public class LpadFunctionIT extends BaseHBaseManagedTimeIT {
-
-/**
- * Helper to test LPAD function
- * 
- * @param conn
- *connection to be used
- * @param colName
- *name of column to query
- * @param length
- *length of the output string
- * @param fillString
- *fill characters to be used while prepending
- * @param sortOrder
- *sort order of the pk column
- * @param expectedOutput
- *expected output of LPAD function
- */
-private void testLpadHelper(Connection conn, String colName, int length, 
List fillStringList,
-List expectedOutputList, String sortOrder) throws Exception {
-assertEquals("fillStringList and expectedOutputList should be of equal 
size", fillStringList.size(),
-expectedOutputList.size());
-for (int id = 0; id < fillStringList.size(); ++id) {
-String fillString = fillStringList.get(id);
-String lPadExpr = fillString != null ? "LPAD(%s,?,?)" : 
"LPAD(%s,?)";
-String sql = String.format("SELECT " + lPadExpr + " FROM 
TEST_TABLE_%s WHERE id=?", colName, sortOrder);
-PreparedStatement stmt = conn.prepareStatement(sql);
-int index = 1;
-stmt.setInt(index++, length);
-if (fillString != null)
-stmt.setString(index++, fillString);
-stmt.setInt(index++, id);
-
-ResultSet rs = stmt.executeQuery();
-assertTrue("Expected exactly one row to be returned ", rs.next());
-assertEquals("LPAD returned incorrect result ", 
expectedOutputList.get(id), rs.getString(1));
-assertFalse("Expected exactly one row to be returned ", rs.next());
-}
-}
-
-/**
- * Helper to test LPAD function
- * 
- * @param conn
- *

phoenix git commit: PHOENIX-2689 VARCHAR Field Not Working With String Concatenation

2016-02-18 Thread jamestaylor
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 e7dbb36ce -> 699362488


PHOENIX-2689 VARCHAR Field Not Working With String Concatenation


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

Branch: refs/heads/4.x-HBase-1.0
Commit: 699362488a036a341c3a1a0b931bb46dc9cfc28c
Parents: e7dbb36
Author: James Taylor 
Authored: Thu Feb 18 12:16:27 2016 -0800
Committer: James Taylor 
Committed: Thu Feb 18 13:30:20 2016 -0800

--
 .../apache/phoenix/end2end/LpadFunctionIT.java  | 242 --
 .../org/apache/phoenix/end2end/StringIT.java| 254 +++
 .../expression/StringConcatExpression.java  |  21 +-
 3 files changed, 271 insertions(+), 246 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/69936248/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
deleted file mode 100644
index 4070103..000
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LpadFunctionIT.java
+++ /dev/null
@@ -1,242 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You under the Apache License, Version 2.0
- *  (the "License"); you may not use this file except in compliance with
- *  the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
- */
-package org.apache.phoenix.end2end;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.hadoop.hbase.util.Bytes;
-import org.apache.phoenix.query.QueryConstants;
-import org.apache.phoenix.util.ByteUtil;
-import org.apache.phoenix.util.TestUtil;
-import org.junit.Test;
-
-import com.google.common.collect.Lists;
-
-/**
- * Tests for the LPAD built-in function.
- */
-
-public class LpadFunctionIT extends BaseHBaseManagedTimeIT {
-
-/**
- * Helper to test LPAD function
- * 
- * @param conn
- *connection to be used
- * @param colName
- *name of column to query
- * @param length
- *length of the output string
- * @param fillString
- *fill characters to be used while prepending
- * @param sortOrder
- *sort order of the pk column
- * @param expectedOutput
- *expected output of LPAD function
- */
-private void testLpadHelper(Connection conn, String colName, int length, 
List fillStringList,
-List expectedOutputList, String sortOrder) throws Exception {
-assertEquals("fillStringList and expectedOutputList should be of equal 
size", fillStringList.size(),
-expectedOutputList.size());
-for (int id = 0; id < fillStringList.size(); ++id) {
-String fillString = fillStringList.get(id);
-String lPadExpr = fillString != null ? "LPAD(%s,?,?)" : 
"LPAD(%s,?)";
-String sql = String.format("SELECT " + lPadExpr + " FROM 
TEST_TABLE_%s WHERE id=?", colName, sortOrder);
-PreparedStatement stmt = conn.prepareStatement(sql);
-int index = 1;
-stmt.setInt(index++, length);
-if (fillString != null)
-stmt.setString(index++, fillString);
-stmt.setInt(index++, id);
-
-ResultSet rs = stmt.executeQuery();
-assertTrue("Expected exactly one row to be returned ", rs.next());
-assertEquals("LPAD returned incorrect result ", 
expectedOutputList.get(id), rs.getString(1));
-assertFalse("Expected exactly one row to be returned ", rs.next());
-}
-}
-
-/**