[ https://issues.apache.org/jira/browse/HIVE-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated HIVE-4681: ----------------------------------- Resolution: Fixed Fix Version/s: vectorization-branch Status: Resolved (was: Patch Available) Committed to branch. Thanks, Gopal! > 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 > Labels: vectorization > Fix For: vectorization-branch > > Attachments: HIVE-4681-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