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

Fix ORC TimestampTreeReader.nextVector() to handle milli-nano math corectly

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

    Details

    • Release Note:
      Fix ORC TimestampTreeReader to sum the second and nanosecond fraction timestamp vectors correctly
    • Tags:
      vectorization

      Description

      The current TimestampTreeReader implementation is broken when fed only milliseconds.

      If TS = 222ms.

         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
      

      which is broken.

      This is not a problem in the Timestamp case, because

      ts.setTime(222);        // {time=0; nanos=222000000}
      ts.setNanos(222000000); // {time=0; nanos=222000000}
      

      Since that is not additive, the error does not occur in the regular ORC reader.

        Attachments

        1. HIVE-4681-001.patch
          3 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