Gopal V created HIVE-4681: ----------------------------- Summary: Fix ORC TimestampTreeReader.nextVector() to handle milli-nano math corectly Key: HIVE-4681 URL: https://issues.apache.org/jira/browse/HIVE-4681 Project: Hive Issue Type: Sub-task Reporter: Gopal V Assignee: Gopal V Attachments: HIVE-4160-001.patch
The current TimestampTreeReader implementation is broken when fed only milliseconds. If TS = 222ms. {code} 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 {code} which is broken. This is not a problem in the Timestamp case, because {code} ts.setTime(222); // {time=0; nanos=222000000} ts.setNanos(222000000); // {time=0; nanos=222000000} {code} Since that is not additive, the error does not occur in the regular ORC reader. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira