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

Stats in ORC file are parsed twice

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • ORC
    • 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. tez-am-2x-protobuf.svg
          335 kB
          Gopal Vijayaraghavan
        2. orc-tail-getproto.png
          330 kB
          Gopal Vijayaraghavan
        3. HIVE-21815.2.patch
          1 kB
          Krisztian Kasa
        4. HIVE-21815.1.patch
          1 kB
          Krisztian Kasa
        5. HIVE-21815.1.patch
          1 kB
          Krisztian Kasa

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              gopalv Gopal Vijayaraghavan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: