Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-4160 Vectorized Query Execution in Hive
  3. HIVE-4884

ORC TimestampTreeReader.nextVector() off by a second when time in fractional

Log workAgile BoardRank to TopRank to BottomVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: vectorization-branch
    • Fix Version/s: vectorization-branch, 0.13.0
    • Component/s: File Formats
    • Labels:
      None
    • Release Note:
      Adjust milliseconds down when encountering a negative second value with a fractional second stored as nanoseconds.

      Description

      When using negative timestamps, the ORC vectorized Timestampreader does the following

      result.vector[i] = (result.vector[i] * 1000000) + nanoVector.vector[i];
      

      This suffers from inaccuracies because the nanoseconds are always positive and the result.vector[i] is in effect

      seconds = (getTime() / 1000)
      nanos = (getNanos())
      // so -42001 ms is written as
      // seconds = -42
      // nanos = 999000000
      // (-42001 / 1000) * 1000 == -42000
      // + 999 ms (from nanos)
      // which is -42999 ms
      

      This needs to be adjusted down if nanos has been zero adjusted, to result in -42001 as the vector[i] value.

        Attachments

        1. HIVE-4884-0000.patch
          2 kB
          Gopal Vijayaraghavan

        Issue Links

          Activity

          $i18n.getText('security.level.explanation', $currentSelection) Viewable by All Users
          Cancel

            People

            • Assignee:
              gopalv Gopal Vijayaraghavan Assign to me
              Reporter:
              gopalv Gopal Vijayaraghavan

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment