Apache-Phoenix | Master | Build Successful

2016-02-09 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
[tdsilva] PHOENIX-2602 Parser does not handle escaped LPAREN



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


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

2016-02-09 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
[tdsilva] PHOENIX-2602 Parser does not handle escaped LPAREN



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-09 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
[tdsilva] PHOENIX-2602 Parser does not handle escaped LPAREN



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


phoenix git commit: PHOENIX-2602 Parser does not handle escaped LPAREN

2016-02-09 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 575040e10 -> 09b0d823d


PHOENIX-2602 Parser does not handle escaped LPAREN


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 09b0d823da3f128f640c1b6c01402fadedbbcae5
Parents: 575040e
Author: Thomas D'Silva 
Authored: Mon Feb 8 16:47:36 2016 -0800
Committer: Thomas D'Silva 
Committed: Tue Feb 9 14:13:02 2016 -0800

--
 .../phoenix/end2end/LikeExpressionIT.java   | 20 
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |  6 +++---
 2 files changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/09b0d823/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
index 1d93341..ecd1e8c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
@@ -123,4 +123,24 @@ public class LikeExpressionIT extends 
BaseHBaseManagedTimeIT {
 
 conn.close();
 }
+
+@Test
+public void testLikeWithEscapenLParen() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+String ddl = "CREATE TABLE t (k VARCHAR, v VARCHAR, CONSTRAINT pk 
PRIMARY KEY (k))";
+conn.createStatement().execute(ddl);
+conn.createStatement().execute("UPSERT INTO t VALUES('aa','bb')");
+conn.createStatement().execute("UPSERT INTO t VALUES('a\\(d','xx')");
+conn.createStatement().execute("UPSERT INTO t VALUES('dd',null)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM t 
WHERE k not like '%\\(%'");
+assertTrue(rs.next());
+assertEquals("aa", rs.getString(1));
+assertEquals("bb", rs.getString(2));
+assertTrue(rs.next());
+assertEquals("dd", rs.getString(1));
+assertEquals(null, rs.getString(2));
+assertFalse(rs.next());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/09b0d823/phoenix-core/src/main/antlr3/PhoenixSQL.g
--
diff --git a/phoenix-core/src/main/antlr3/PhoenixSQL.g 
b/phoenix-core/src/main/antlr3/PhoenixSQL.g
index 76a0e90..1aa7f3d 100644
--- a/phoenix-core/src/main/antlr3/PhoenixSQL.g
+++ b/phoenix-core/src/main/antlr3/PhoenixSQL.g
@@ -1205,14 +1205,14 @@ DIGIT
 STRING_LITERAL
 @init{ StringBuilder sb = new StringBuilder(); }
 :   '\''
-( t=CHAR { sb.append(t.getText()); }
-| t=CHAR_ESC { sb.append(getText()); }
+( t=CHAR_ESC { sb.append(getText()); }
+| t=CHAR { sb.append(t.getText()); }
 )* '\'' { setText(sb.toString()); }
 ;
 
 fragment
 CHAR
-:   ( ~('\'' | '\\') )+
+:   ( ~('\'') )
 ;
 
 fragment



phoenix git commit: PHOENIX-2602 Parser does not handle escaped LPAREN

2016-02-09 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/master d5518f02d -> c485a40c7


PHOENIX-2602 Parser does not handle escaped LPAREN


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

Branch: refs/heads/master
Commit: c485a40c766e34e3a5a443e60057cfaa1cb92869
Parents: d5518f0
Author: Thomas D'Silva 
Authored: Mon Feb 8 16:47:36 2016 -0800
Committer: Thomas D'Silva 
Committed: Tue Feb 9 15:08:37 2016 -0800

--
 .../phoenix/end2end/LikeExpressionIT.java   | 20 
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |  6 +++---
 2 files changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/c485a40c/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
index 1d93341..ecd1e8c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
@@ -123,4 +123,24 @@ public class LikeExpressionIT extends 
BaseHBaseManagedTimeIT {
 
 conn.close();
 }
+
+@Test
+public void testLikeWithEscapenLParen() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+String ddl = "CREATE TABLE t (k VARCHAR, v VARCHAR, CONSTRAINT pk 
PRIMARY KEY (k))";
+conn.createStatement().execute(ddl);
+conn.createStatement().execute("UPSERT INTO t VALUES('aa','bb')");
+conn.createStatement().execute("UPSERT INTO t VALUES('a\\(d','xx')");
+conn.createStatement().execute("UPSERT INTO t VALUES('dd',null)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM t 
WHERE k not like '%\\(%'");
+assertTrue(rs.next());
+assertEquals("aa", rs.getString(1));
+assertEquals("bb", rs.getString(2));
+assertTrue(rs.next());
+assertEquals("dd", rs.getString(1));
+assertEquals(null, rs.getString(2));
+assertFalse(rs.next());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/c485a40c/phoenix-core/src/main/antlr3/PhoenixSQL.g
--
diff --git a/phoenix-core/src/main/antlr3/PhoenixSQL.g 
b/phoenix-core/src/main/antlr3/PhoenixSQL.g
index 23f7e8f..0be5717 100644
--- a/phoenix-core/src/main/antlr3/PhoenixSQL.g
+++ b/phoenix-core/src/main/antlr3/PhoenixSQL.g
@@ -1213,14 +1213,14 @@ DIGIT
 STRING_LITERAL
 @init{ StringBuilder sb = new StringBuilder(); }
 :   '\''
-( t=CHAR { sb.append(t.getText()); }
-| t=CHAR_ESC { sb.append(getText()); }
+( t=CHAR_ESC { sb.append(getText()); }
+| t=CHAR { sb.append(t.getText()); }
 )* '\'' { setText(sb.toString()); }
 ;
 
 fragment
 CHAR
-:   ( ~('\'' | '\\') )+
+:   ( ~('\'') )
 ;
 
 fragment



phoenix git commit: PHOENIX-2602 Parser does not handle escaped LPAREN

2016-02-09 Thread tdsilva
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-1.0 dbde8c387 -> e31ede5cd


PHOENIX-2602 Parser does not handle escaped LPAREN


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

Branch: refs/heads/4.x-HBase-1.0
Commit: e31ede5cdce4ae5e23be30d749f7c3feaacde3bc
Parents: dbde8c3
Author: Thomas D'Silva 
Authored: Mon Feb 8 16:47:36 2016 -0800
Committer: Thomas D'Silva 
Committed: Tue Feb 9 15:08:29 2016 -0800

--
 .../phoenix/end2end/LikeExpressionIT.java   | 20 
 phoenix-core/src/main/antlr3/PhoenixSQL.g   |  6 +++---
 2 files changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/phoenix/blob/e31ede5c/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
--
diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
index 1d93341..ecd1e8c 100644
--- a/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
+++ b/phoenix-core/src/it/java/org/apache/phoenix/end2end/LikeExpressionIT.java
@@ -123,4 +123,24 @@ public class LikeExpressionIT extends 
BaseHBaseManagedTimeIT {
 
 conn.close();
 }
+
+@Test
+public void testLikeWithEscapenLParen() throws Exception {
+Connection conn = DriverManager.getConnection(getUrl());
+String ddl = "CREATE TABLE t (k VARCHAR, v VARCHAR, CONSTRAINT pk 
PRIMARY KEY (k))";
+conn.createStatement().execute(ddl);
+conn.createStatement().execute("UPSERT INTO t VALUES('aa','bb')");
+conn.createStatement().execute("UPSERT INTO t VALUES('a\\(d','xx')");
+conn.createStatement().execute("UPSERT INTO t VALUES('dd',null)");
+conn.commit();
+
+ResultSet rs = conn.createStatement().executeQuery("SELECT * FROM t 
WHERE k not like '%\\(%'");
+assertTrue(rs.next());
+assertEquals("aa", rs.getString(1));
+assertEquals("bb", rs.getString(2));
+assertTrue(rs.next());
+assertEquals("dd", rs.getString(1));
+assertEquals(null, rs.getString(2));
+assertFalse(rs.next());
+}
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/e31ede5c/phoenix-core/src/main/antlr3/PhoenixSQL.g
--
diff --git a/phoenix-core/src/main/antlr3/PhoenixSQL.g 
b/phoenix-core/src/main/antlr3/PhoenixSQL.g
index 23f7e8f..0be5717 100644
--- a/phoenix-core/src/main/antlr3/PhoenixSQL.g
+++ b/phoenix-core/src/main/antlr3/PhoenixSQL.g
@@ -1213,14 +1213,14 @@ DIGIT
 STRING_LITERAL
 @init{ StringBuilder sb = new StringBuilder(); }
 :   '\''
-( t=CHAR { sb.append(t.getText()); }
-| t=CHAR_ESC { sb.append(getText()); }
+( t=CHAR_ESC { sb.append(getText()); }
+| t=CHAR { sb.append(t.getText()); }
 )* '\'' { setText(sb.toString()); }
 ;
 
 fragment
 CHAR
-:   ( ~('\'' | '\\') )+
+:   ( ~('\'') )
 ;
 
 fragment