You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ss...@apache.org on 2017/03/02 20:55:30 UTC

[1/3] phoenix git commit: Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column

Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 321b62edd -> 596f02e2e
  refs/heads/4.x-HBase-1.1 91a436dd3 -> f6f4930a7
  refs/heads/4.x-HBase-1.3 4b5291d29 -> 966b13bd0


Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column


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

Branch: refs/heads/4.x-HBase-1.1
Commit: f6f4930a71c12db081d2511ee24eeb3d81314643
Parents: 91a436d
Author: Sergey Soldatov <ss...@apache.org>
Authored: Wed Mar 1 15:41:49 2017 -0800
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Thu Mar 2 12:53:26 2017 -0800

----------------------------------------------------------------------
 .../hive/query/PhoenixQueryBuilderTest.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f6f4930a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
index e4f872e..bc2cbe3 100644
--- a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
+++ b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
@@ -102,7 +102,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2", "CHAR3"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not in ('CHAR1', 'CHAR2', 'CHAR3')",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not in ('CHAR1', 'CHAR2', 'CHAR3')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -118,7 +118,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not between 'CHAR1' and 'CHAR2'",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not between 'CHAR1' and 'CHAR2'",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -126,8 +126,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildBetweenQueryWithDateColumns() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -138,7 +138,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -147,7 +147,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " not between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" not between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -155,8 +155,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildQueryWithNotNull() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -167,7 +167,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " is not null ",
+                        "\"" + COLUMN_DATE + "\" is not null ",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 }


[2/3] phoenix git commit: Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column

Posted by ss...@apache.org.
Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column


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

Branch: refs/heads/4.x-HBase-0.98
Commit: 596f02e2eda5fa6065430606f485a5ea1f57d0c1
Parents: 321b62e
Author: Sergey Soldatov <ss...@apache.org>
Authored: Wed Mar 1 15:41:49 2017 -0800
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Thu Mar 2 12:53:55 2017 -0800

----------------------------------------------------------------------
 .../hive/query/PhoenixQueryBuilderTest.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/596f02e2/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
index e4f872e..bc2cbe3 100644
--- a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
+++ b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
@@ -102,7 +102,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2", "CHAR3"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not in ('CHAR1', 'CHAR2', 'CHAR3')",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not in ('CHAR1', 'CHAR2', 'CHAR3')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -118,7 +118,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not between 'CHAR1' and 'CHAR2'",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not between 'CHAR1' and 'CHAR2'",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -126,8 +126,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildBetweenQueryWithDateColumns() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -138,7 +138,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -147,7 +147,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " not between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" not between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -155,8 +155,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildQueryWithNotNull() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -167,7 +167,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " is not null ",
+                        "\"" + COLUMN_DATE + "\" is not null ",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 }


[3/3] phoenix git commit: Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column

Posted by ss...@apache.org.
Fixed UT for PHOENIX-3346 Hive PhoenixStorageHandler doesn't work well with column


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

Branch: refs/heads/4.x-HBase-1.3
Commit: 966b13bd0ae4eb670360ce0c8ae4501f2d61fa4a
Parents: 4b5291d
Author: Sergey Soldatov <ss...@apache.org>
Authored: Wed Mar 1 15:41:49 2017 -0800
Committer: Sergey Soldatov <ss...@apache.org>
Committed: Thu Mar 2 12:54:08 2017 -0800

----------------------------------------------------------------------
 .../hive/query/PhoenixQueryBuilderTest.java       | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/966b13bd/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
index e4f872e..bc2cbe3 100644
--- a/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
+++ b/phoenix-hive/src/test/java/org/apache/phoenix/hive/query/PhoenixQueryBuilderTest.java
@@ -102,7 +102,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2", "CHAR3"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not in ('CHAR1', 'CHAR2', 'CHAR3')",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not in ('CHAR1', 'CHAR2', 'CHAR3')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -118,7 +118,7 @@ public class PhoenixQueryBuilderTest {
                         new Object[]{"CHAR1", "CHAR2"}, COLUMN_CHAR, "char(10)", true)
         );
 
-        assertEquals(expectedQueryPrefix + "Column_Char not between 'CHAR1' and 'CHAR2'",
+        assertEquals(expectedQueryPrefix + "\"Column_Char\" not between 'CHAR1' and 'CHAR2'",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -126,8 +126,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildBetweenQueryWithDateColumns() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -138,7 +138,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
 
         searchConditions = Lists.newArrayList(
@@ -147,7 +147,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " not between to_date('1992-01-02') and to_date('1992-02-02')",
+                        "\"" + COLUMN_DATE + "\" not between to_date('1992-01-02') and to_date('1992-02-02')",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 
@@ -155,8 +155,8 @@ public class PhoenixQueryBuilderTest {
     public void testBuildQueryWithNotNull() throws IOException {
         final String COLUMN_DATE = "Column_Date";
         final String tableName = "TEST_TABLE";
-        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ " + COLUMN_DATE +
-                " from " + tableName + " where ";
+        final String expectedQueryPrefix = "select /*+ NO_CACHE  */ \"" + COLUMN_DATE +
+                "\" from " + tableName + " where ";
 
         JobConf jobConf = new JobConf();
         List<String> readColumnList = Lists.newArrayList(COLUMN_DATE);
@@ -167,7 +167,7 @@ public class PhoenixQueryBuilderTest {
         );
 
         assertEquals(expectedQueryPrefix +
-                        COLUMN_DATE + " is not null ",
+                        "\"" + COLUMN_DATE + "\" is not null ",
                 BUILDER.buildQuery(jobConf, TABLE_NAME, readColumnList, searchConditions));
     }
 }