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

Stats in ORC file are parsed twice

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0
    • Component/s: ORC
    • Labels:
      None

      Description

      ORC record reader unnecessarily parses stats twice

            if (orcTail == null) {
              Reader orcReader = OrcFile.createReader(file.getPath(),
                  OrcFile.readerOptions(context.conf)
                      .filesystem(fs)
                      .maxLength(AcidUtils.getLogicalLength(fs, file)));
              orcTail = new OrcTail(orcReader.getFileTail(), orcReader.getSerializedFileFooter(),
                  file.getModificationTime());
              if (context.cacheStripeDetails) {
                context.footerCache.put(new FooterCacheKey(fsFileId, file.getPath()), orcTail);
              }
            }
            stripes = orcTail.getStripes();
            stripeStats = orcTail.getStripeStatistics();
      

      We go from Reader -> OrcTail -> StripeStatistics.

      stripeStats is read out of the orcTail and is already read inside orcReader.getStripeStatistics().

      tez-am-2x-protobuf.svg

        Attachments

        1. HIVE-21815.1.patch
          1 kB
          Krisztian Kasa
        2. HIVE-21815.1.patch
          1 kB
          Krisztian Kasa
        3. HIVE-21815.2.patch
          1 kB
          Krisztian Kasa
        4. orc-tail-getproto.png
          330 kB
          Gopal Vijayaraghavan
        5. tez-am-2x-protobuf.svg
          335 kB
          Gopal Vijayaraghavan

          Issue Links

            Activity

              People

              • Assignee:
                kkasa Krisztian Kasa
                Reporter:
                gopalv Gopal Vijayaraghavan
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: