You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/06/10 19:19:56 UTC

svn commit: r1491532 - /hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java

Author: hashutosh
Date: Mon Jun 10 17:19:56 2013
New Revision: 1491532

URL: http://svn.apache.org/r1491532
Log:
HIVE-4694 : Fix ORC TestVectorizedORCReader testcase for Timestamps (Gopal V via Ashutosh Chauhan)

Modified:
    hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java

Modified: hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java
URL: http://svn.apache.org/viewvc/hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java?rev=1491532&r1=1491531&r2=1491532&view=diff
==============================================================================
--- hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java (original)
+++ hive/branches/vectorization/ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestVectorizedORCReader.java Mon Jun 10 17:19:56 2013
@@ -141,7 +141,10 @@ public class TestVectorizedORCReader {
           // Timestamps are stored as long, so convert and compare
           if (a instanceof Timestamp) {
             Timestamp t = ((Timestamp) a);
-            Long timeInNanoSec = (t.getTime() * 1000000) + t.getNanos();
+            // Timestamp.getTime() is overriden and is 
+            // long time = super.getTime();
+            // return (time + (nanos / 1000000));
+            Long timeInNanoSec = (t.getTime() * 1000000) + (t.getNanos() % 1000000);
             Assert.assertEquals(true, timeInNanoSec.toString().equals(b.toString()));
             continue;
           }