apache / apache/parquet-java

BIT_PACKING is written by default when Definition or Repetition levels are empty

Open
#3,307 6 comments 0 reactions 0 assignees View on GitHub
Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

As discussed in https://github.com/apache/arrow/discussions/47113 , this package is writing the deprecated BIT_PACKING encoding to the column metadata and the DataPageHeader. This is only seems to happens when rep/def levels are empty. I think this is where it's happening:

```java
public class DevNullValuesWriter extends ValuesWriter {
....
public Encoding getEncoding() {
return BIT_PACKED;
}
}
```

Wouldn't it make sense to just return RLE?

I've seen this in parquet-java 1.15.1 and Overture Maps files using 1.13.1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating DevNullValuesWriter and inspecting its getEncoding() implementation, then trace how that value reaches the column metadata and DataPageHeader. Confirm that empty repetition and definition levels no longer produce the deprecated BIT_PACKED encoding and instead use RLE.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.