[
https://issues.apache.org/jira/browse/HIVE-21729?focusedWorklogId=442949&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-442949
]
ASF GitHub Bot logged work on HIVE-21729:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Jun/20 16:15
Start Date: 09/Jun/20 16:15
Worklog Time Spent: 10m
Work Description: github-actions[bot] commented on pull request #627:
URL: https://github.com/apache/hive/pull/627#issuecomment-641143449
This pull request has been automatically marked as stale because it has not
had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the [email protected] list if the patch is in
need of reviews.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 442949)
Time Spent: 20m (was: 10m)
> Arrow serializer sometimes shifts timestamp by one second
> ---------------------------------------------------------
>
> Key: HIVE-21729
> URL: https://issues.apache.org/jira/browse/HIVE-21729
> Project: Hive
> Issue Type: Bug
> Components: Serializers/Deserializers
> Affects Versions: 4.0.0
> Reporter: Shubham Chaurasia
> Assignee: Shubham Chaurasia
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Attachments: HIVE-21729.1.patch, HIVE-21729.2.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> This happens due to
> [secondInMicros|https://github.com/apache/hive/blob/rel/release-3.1.1/ql/src/java/org/apache/hadoop/hive/ql/io/arrow/Serializer.java#L445]
> are calculated like
> {code}
> final long secondInMicros = (secondInMillis - secondInMillis %
> MILLIS_PER_SECOND) * MICROS_PER_MILLIS;
> {code}
> Instead this should be calculated like(by taking nanos from
> timestampColumnVector itself)
> {code}
> final long nanos = timestampColumnVector.getNanos(j);
> final long secondInMicros = (secondInMillis - nanos / NS_PER_MILLIS) *
> MICROS_PER_MILLIS;
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)