apache / apache/parquet-java

FilteredRecordReader skips rows it shouldn't for schema with optional columns

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

描述

When using UnboundRecordFilter with nested AND/OR filters over OPTIONAL columns, there seems to be a case with a mismatch between the current record's column value and the value read during filtering.

The structure of my filter predicate that results in incorrect filtering is: (x && (y || z))

When I step through it with a debugger I can see that the value being read from the ColumnReader inside my Predicate is different than the value for that row.

Looking deeper there seems to be a buffer with dictionary keys in RunLenghBitPackingHybridDecoder (I am using RLE). There are only two different keys in this array, [0,1], whereas my optional column has three different values, [null,0,1]. If I had a column with values 5,10,10,null,10, and keys 0 -> 5 and 1 -> 10, the buffer would hold 0,1,1,1,0, and in the case that it reads the last row, would return 0 -> 5.

So it seems that nothing is keeping track of where nulls appear.

Hope someone can take a look, as it is a blocker for my project.

**Environment**: Linux, Java7/Java8
**Reporter**: [Steven Mellinger](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=stevemel)
#### Related issues:
- [filter2 API performance regression](https://github.com/apache/parquet-java/issues/1583) (relates to)

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

贡献指南

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

调研方向

首先,跟踪嵌套谓词 (x \u0026\u0026 (y || z)) 在 FilteredRecordReader、UnboundRecordFilter 和 ColumnReader 中的处理过程。使用包含 null、0 和 1 的可选列检查 RunLenghBitPackingHybridDecoder,并将解码后的值与行位置进行比较。完成标准是过滤返回正确的行,并且回归覆盖保留 null 位置。

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

评估

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

把新 issue 发到你的邮箱

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