[ 
https://issues.apache.org/jira/browse/ORC-346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444664#comment-16444664
 ] 

ASF GitHub Bot commented on ORC-346:
------------------------------------

GitHub user rip-nsk opened a pull request:

    https://github.com/apache/orc/pull/253

    ORC-346: [C++] Add one second when writing negative Timestamp's with non 
zero nanos …

    …to match the reader code.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rip-nsk/orc ORC-346

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/orc/pull/253.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #253
    
----
commit 0507d1f970c613fd7b12ee814fb9e040bfa30d24
Author: rip-nsk <rip.nsk@...>
Date:   2018-04-19T19:22:09Z

    Add one second when writing negative Timestamp's with non zero nanos to 
match the reader code.

----


> Bug in TimestampColumnReader (or Writer)
> ----------------------------------------
>
>                 Key: ORC-346
>                 URL: https://issues.apache.org/jira/browse/ORC-346
>             Project: ORC
>          Issue Type: Bug
>          Components: C++
>            Reporter: rip.nsk
>            Priority: Critical
>
> void TimestampColumnReader::next(ColumnVectorBatch& rowBatch, uint64_t 
> numValues, char *notNull)
> has the following code:
> c++\src\ColumnReader.cc:338
> int64_t writerTime = secsBuffer[i] + epochOffset;
>  secsBuffer[i] = writerTimezone.convertToUTC(writerTime);
>  {color:#f79232}if (secsBuffer[i] < 0 && nanoBuffer[i] != 0) {{color}
> {color:#f79232} secsBuffer[i] -= 1;{color}
> {color:#f79232} }{color}
> {color:#333333}which likely leads to read wrong seconds value for PRE_1970 
> dates{color}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to