Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5636

Impala writer claims that file uses BIT_PACKED encoding when it doesn't

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • Impala 2.10.0
    • Backend
    • ghx-label-1

    Description

      The Parquet writer always adds the BIT_PACKED and RLE encodings even though (I'm pretty sure) we never write out the BIT_PACKED encoding for rep or def levels. The BIT_PACKED encoding is deprecated according to the Parquet specification: https://github.com/Parquet/parquet-format/blob/master/Encodings.md and it is not clear that Impala can even read it correctly: IMPALA-3006

      One way of seeing that Impala claims to need the BIT_PACKED encoding is to write a parquet file with Impala then inspect it with parquet-tool.

      BIT_PACKED is never written by Impala's parquet writer - the definition levels are always written using an RleEncoder and reported as Encoding::RLE. Weirdly, the repetition levels are reported as "BIT_PACKED", but this encoding has no effect since we don't actually write out repetition levels.

          // The code that populates the column chunk metadata's encodings field
          // relies on these specific values for the definition/repetition level
          // encodings.
          header.definition_level_encoding = Encoding::RLE;
          header.repetition_level_encoding = Encoding::BIT_PACKED;
          current_page_->header.__set_data_page_header(header);
      

      Attachments

        Issue Links

          Activity

            People

              tianyiwang Tianyi Wang
              tarmstrong Tim Armstrong
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: