Uploaded image for project: 'Parquet'
  1. Parquet
  2. PARQUET-1324

[C++] Read Parquet dictionary encoded ColumnChunks directly into an Arrow DictionaryArray

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: parquet-cpp
    • Labels:
      None

      Description

      Dictionary data is very common in parquet, in the current implementation parquet-cpp decodes dictionary encoded data always before creating a plain arrow array. This process is wasteful since we could use arrow's DictionaryArray directly and achieve several benefits:

      1. Smaller memory footprint - both in the decoding process and in the resulting arrow table - especially when the dict values are large
      2. Better decoding performance - mostly as a result of the first bullet - less memory fetches and less allocations.

      I think those benefits could achieve significant improvements in runtime.

      My direction for the implementation is to read the indices (through the DictionaryDecoder, after the RLE decoding) and values separately into 2 arrays and create a DictionaryArray using them.

      There are some questions to discuss:

      1. Should this be the default behavior for dictionary encoded data
      2. Should it be controlled with a parameter in the API
      3. What should be the policy in case some of the chunks are dictionary encoded and some are not.

      I started implementing this but would like to hear your opinions.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              snir Stav Nir
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: