Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21729

Arrow serializer sometimes shifts timestamp by one second

    XMLWordPrintableJSON

Details

    Description

      This happens due to secondInMicros are calculated like

      final long secondInMicros = (secondInMillis - secondInMillis % MILLIS_PER_SECOND) * MICROS_PER_MILLIS;
      

      Instead this should be calculated like(by taking nanos from timestampColumnVector itself)

      final long nanos = timestampColumnVector.getNanos(j);
      final long secondInMicros = (secondInMillis - nanos / NS_PER_MILLIS) * MICROS_PER_MILLIS;
      

      Attachments

        1. HIVE-21729.1.patch
          4 kB
          Shubham Chaurasia
        2. HIVE-21729.2.patch
          4 kB
          Shubham Chaurasia

        Issue Links

          Activity

            People

              ShubhamChaurasia Shubham Chaurasia
              ShubhamChaurasia Shubham Chaurasia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h