Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Fix ORC TimestampTreeReader to sum the second and nanosecond fraction timestamp vectors correctly
-
vectorization
Description
The current TimestampTreeReader implementation is broken when fed only milliseconds.
If TS = 222ms.
result.vector[i] = ... // == 0; nanoVector.vector[i] = ... // == 222000000 if (result.vector[i] >= 0) { result.vector[i] += nanoVector.vector[i] / 1000000; // 222 } ... result.vector[i] = (result.vector[i] * 1000000) + nanoVector.vector[i]; // result.vector[i] == 444000000
which is broken.
This is not a problem in the Timestamp case, because
ts.setTime(222); // {time=0; nanos=222000000} ts.setNanos(222000000); // {time=0; nanos=222000000}
Since that is not additive, the error does not occur in the regular ORC reader.
Attachments
Attachments
Issue Links
- relates to
-
HIVE-4884 ORC TimestampTreeReader.nextVector() off by a second when time in fractional
- Resolved