apache / apache/parquet-java

Delta Encoding is not used when dictionary enabled

未关闭
#2,024 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Component: Java Component: Parquet Priority: Major Type: bug
主要语言
Java
星标
3.1k
派生
1.6k
平均合并
3 天 12 小时
30 天内合并 PR
33

描述

Current code doesn't enable using both Delta Encoding and Dictionary Encoding. If I instantiate ParquetWriter like this :
```Java
val writer = new ParquetWriter[Group](outFile, new GroupWriteSupport, codec, blockSize, pageSize, dictPageSize, enableDictionary = true, true, ParquetProperties.WriterVersion.PARQUET_2_0, configuration)
```

Then this piece of code :
https://github.com/apache/parquet-mr/blob/master/parquet-column/src/main/java/org/apache/parquet/column/values/factory/DefaultValuesWriterFactory.java#L78-L86

Causes that DictionaryValuesWriter is used instead of the inferred DeltaLongEncodingWriter.

The original issue is here : https://github.com/apache/parquet-mr/pull/154#issuecomment-266489768

**Reporter**: [Jakub Liska](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=l154k)

**Note**: *This issue was originally created as [PARQUET-796](https://issues.apache.org/jira/browse/PARQUET-796). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

贡献指南

这个仓库没有索引到贡献指南

调研方向

从 parquet-column/src/main/java/org/apache/parquet/column/values/factory/DefaultValuesWriterFactory.java 的第 78-86 行开始,然后跟踪 DictionaryValuesWriter 如何被选中而不是推断出的 DeltaLongEncodingWriter。重现 issue 中的 ParquetWriter 配置,并添加覆盖测试,展示启用 dictionary encoding 时预期的编码行为。

由索引模型根据 Issue 内容生成。

评估

技术栈
java
领域
data-engineering
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。