hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gopal V (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-4681) Fix ORC TimestampTreeReader.nextVector() to handle milli-nano math corectly
Date Fri, 07 Jun 2013 00:08:20 GMT

     [ https://issues.apache.org/jira/browse/HIVE-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gopal V updated HIVE-4681:
--------------------------

    Attachment: HIVE-4160-001.patch

Refactored TimestampTreeReader.nextVector() with bug fix.
                
> 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
>         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

Mime
View raw message