You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by "Balaji K (Jira)" <ji...@apache.org> on 2021/12/10 20:54:00 UTC

[jira] [Created] (PARQUET-2108) Specification for RLEDictionary encoding is incorrect.

Balaji K created PARQUET-2108:
---------------------------------

             Summary: Specification for RLEDictionary encoding is incorrect.
                 Key: PARQUET-2108
                 URL: https://issues.apache.org/jira/browse/PARQUET-2108
             Project: Parquet
          Issue Type: Bug
            Reporter: Balaji K


The [spec for RLE Dictionary|[https://github.com/apache/parquet-format/blob/master/Encodings.md#dictionary-encoding-plain_dictionary--2-and-rle_dictionary--8]] encoding says the "length of the encoded-data" is placed before the "encoded-data". Reproducing the first 3 lines here:

```

rle-bit-packed-hybrid: <length> <encoded-data>

length := length of the <encoded-data> in bytes stored as 4 bytes little endian (unsigned int32)

encoded-data := <run>*

```

However, this is not true. Parquet-MR implementation does not encode the length in front of the data. It encodes bitWidth as 1 byte. See [implementation|[https://github.com/apache/parquet-mr/blob/01a5d074829ad4cf4de1f662d54fe7bceb4bef63/parquet-column/src/main/java/org/apache/parquet/column/values/dictionary/DictionaryValuesWriter.java#L173]].

I'm proposing the spec be updated to state the above clearly.

see discussion here:

[https://lists.apache.org/thread/p45tpjd5r03qbswtpr7xfy072josnjxs]

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)