Repository: phoenix
Updated Branches:
  refs/heads/master 6b363b3a2 -> 8a874cc95 (forced update)


PHOENIX-4756 Integration tests for PhoenixStorageHandler doesn't work on 5.x 
branch


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

Branch: refs/heads/master
Commit: b21877d75b66cb2c738f4949b444623981f30d95
Parents: 8a955d4
Author: Sergey Soldatov <s...@apache.org>
Authored: Sun May 27 23:05:00 2018 -0700
Committer: ss77892 <s...@apache.org>
Committed: Wed May 30 21:03:44 2018 -0700

----------------------------------------------------------------------
 phoenix-hive/pom.xml                            | 29 ++++++++++++++++++++
 .../apache/phoenix/hive/HivePhoenixStoreIT.java |  9 ++++--
 .../PhoenixStorageHandlerConstants.java         |  4 +--
 .../PhoenixByteObjectInspector.java             |  2 +-
 .../PhoenixDoubleObjectInspector.java           |  2 +-
 5 files changed, 39 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/b21877d7/phoenix-hive/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-hive/pom.xml b/phoenix-hive/pom.xml
index 8b9b4c1..0bc582c 100644
--- a/phoenix-hive/pom.xml
+++ b/phoenix-hive/pom.xml
@@ -78,6 +78,12 @@
     <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-mapreduce-client-core</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>io.netty</groupId>
+          <artifactId>netty</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <!-- Test dependencies -->
@@ -105,6 +111,11 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>io.netty</groupId>
+      <artifactId>netty-all</artifactId>
+      <version>4.1.17.Final</version>
+    </dependency>
+    <dependency>
       <groupId>org.apache.hadoop</groupId>
       <artifactId>hadoop-hdfs</artifactId>
       <type>test-jar</type>
@@ -156,6 +167,24 @@
         </exclusion>
       </exclusions>
     </dependency>
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-util</artifactId>
+        <scope>test</scope>
+        <version>9.3.8.v20160314</version>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-http</artifactId>
+        <scope>test</scope>
+        <version>9.3.8.v20160314</version>
+      </dependency>
+      <dependency>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-server</artifactId>
+        <scope>test</scope>
+        <version>9.3.8.v20160314</version>
+      </dependency>
     <dependency>
       <groupId>org.mockito</groupId>
       <artifactId>mockito-all</artifactId>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b21877d7/phoenix-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
----------------------------------------------------------------------
diff --git 
a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java 
b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
index a62d780..ecb2003 100644
--- a/phoenix-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
+++ b/phoenix-hive/src/it/java/org/apache/phoenix/hive/HivePhoenixStoreIT.java
@@ -315,7 +315,7 @@ public class HivePhoenixStoreIT  extends 
BaseHivePhoenixStoreIT {
     public void testTimestampPredicate() throws Exception {
         String testName = "testTimeStampPredicate";
         hbaseTestUtil.getTestFileSystem().createNewFile(new Path(hiveLogDir, 
testName + ".out"));
-        createFile("10\t2013-01-02 01:01:01.123456\n", new Path(hiveOutputDir, 
testName + ".out").toString());
+        createFile("10\t2013-01-02 01:01:01.123\n", new Path(hiveOutputDir, 
testName + ".out").toString());
         createFile(StringUtil.EMPTY_STRING, new Path(hiveLogDir, testName + 
".out").toString());
 
         StringBuilder sb = new StringBuilder();
@@ -330,9 +330,12 @@ public class HivePhoenixStoreIT  extends 
BaseHivePhoenixStoreIT {
                 hbaseTestUtil.getZkCluster().getClientPort() + "'," + 
HiveTestUtil.CRLF +
                 "   'phoenix.column.mapping' = 'id:ID, ts:TS'," + 
HiveTestUtil.CRLF +
                 "   'phoenix.rowkeys'='id');" + HiveTestUtil.CRLF);
+        /*
+        Following query only for check that nanoseconds are correctly parsed 
with over 3 digits.
+         */
         sb.append("INSERT INTO TABLE timeStampTable VALUES (10, \"2013-01-02 
01:01:01.123456\");" + HiveTestUtil.CRLF);
-        sb.append("SELECT * from timeStampTable WHERE ts between '2013-01-02 
01:01:01.123455' and " +
-                " '2013-01-02 12:01:02.123457789' AND id = 10;" + 
HiveTestUtil.CRLF);
+        sb.append("SELECT * from timeStampTable WHERE ts between '2012-01-02 
01:01:01.123455' and " +
+                " '2015-01-02 12:01:02.123457789' AND id = 10;" + 
HiveTestUtil.CRLF);
 
         String fullPath = new Path(hbaseTestUtil.getDataTestDir(), 
testName).toString();
         createFile(sb.toString(), fullPath);

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b21877d7/phoenix-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
----------------------------------------------------------------------
diff --git 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
index e3c7d84..1e36413 100644
--- 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
+++ 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/constants/PhoenixStorageHandlerConstants.java
@@ -101,8 +101,8 @@ public class PhoenixStorageHandlerConstants {
 
     public static final String FUNCTION_VALUE_MARKER = "$value$";
     public static final String DATE_FUNCTION_TEMPLETE = "to_date(" + 
FUNCTION_VALUE_MARKER + ")";
-    public static final String TIMESTAMP_FUNCTION_TEMPLATE = "to_timestamp(" +
-            FUNCTION_VALUE_MARKER + ")";
+    public static final String TIMESTAMP_FUNCTION_TEMPLATE = "TIMESTAMP" +
+            FUNCTION_VALUE_MARKER;
 
     public static final IntWritable INT_ZERO = new IntWritable(0);
 }

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b21877d7/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
----------------------------------------------------------------------
diff --git 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
index a19342a..6972238 100644
--- 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
+++ 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixByteObjectInspector.java
@@ -19,7 +19,7 @@ package org.apache.phoenix.hive.objectinspector;
 
 import 
org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
-import org.apache.hadoop.io.ByteWritable;
+import org.apache.hadoop.hive.serde2.io.ByteWritable;
 
 /**
  * ObjectInspector for byte type

http://git-wip-us.apache.org/repos/asf/phoenix/blob/b21877d7/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
----------------------------------------------------------------------
diff --git 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
index 9f440ed..bd1c2e2 100644
--- 
a/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
+++ 
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/objectinspector/PhoenixDoubleObjectInspector.java
@@ -19,7 +19,7 @@ package org.apache.phoenix.hive.objectinspector;
 
 import 
org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
 import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory;
-import org.apache.hadoop.io.DoubleWritable;
+import org.apache.hadoop.hive.serde2.io.DoubleWritable;
 
 /**
  * ObjectInspector for double type

Reply via email to