jcamachor commented on a change in pull request #833: Hive JDBC Storage 
Handler: Incorrect results fetched from BOOLEAN and TIMESTAMP DataType From 
JDBC Data Source
URL: https://github.com/apache/hive/pull/833#discussion_r341823885
 
 

 ##########
 File path: 
jdbc-handler/src/main/java/org/apache/hive/storage/jdbc/JdbcSerDe.java
 ##########
 @@ -226,7 +226,7 @@ public Object deserialize(Writable blob) throws 
SerDeException {
         case TIMESTAMP:
           if (rowVal instanceof java.sql.Timestamp) {
             java.sql.Timestamp timestampRowVal = (java.sql.Timestamp) rowVal;
-            rowVal = Timestamp.ofEpochMilli(timestampRowVal.getTime(), 
timestampRowVal.getNanos());
+            rowVal = new Timestamp(timestampRowVal);
 
 Review comment:
   It seems `Date` type should have same issue (visible depending on time 
zone). Could we change that accordingly too?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to