Page-index pruning can drop rows for INT32/INT64-encoded decimals
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- rust
調査の方向性
Look at PageIndexEvaluator::apply_predicate_to_column_index in the codebase. Understand how it constructs INT32/INT64 page bounds. Compare with get_parquet_stat_min_as_datum for decimal handling. The fix is to convert those bounds to Int128 for decimal fields. Write tests for inequality and IN predicates with row selection enabled, likely in the test suite for page index pruning.
索引モデルが issue の本文から書いたものです。
説明
Apache Iceberg Rust version
main @ https://github.com/apache/iceberg-rust/commit/e694eea42032a3f0898ccee33f5d3dd0ca9cd24b
Describe the bug
Surfaced during https://github.com/apache/iceberg-rust/pull/3247#pullrequestreview-5282630063
PageIndexEvaluator::apply_predicate_to_column_index constructs INT32 and INT64 page bounds as PrimitiveLiteral::Int and PrimitiveLiteral::Long, regardless of the Iceberg field type.
For decimal fields, query datums use PrimitiveLiteral::Int128. Datum::partial_cmp only compares decimal datums when both literals are Int128, so comparisons between these page bounds and query datums return None.
This can silently prune matching pages when page-index row selection is enabled:
- Inequality predicates (<, <=, >, >=) treat the failed comparison as false and reject the page.
- IN can conclude that no literal is within the page bounds and reject the page.
- Equality currently fails open and retains the page.
The row-group statistics path already handles these encodings correctly: get_parquet_stat_min_as_datum (and max) convert decimal Statistics::Int32 and Statistics::Int64 values to PrimitiveLiteral::Int128.
Parquet commonly encodes decimal precision ≤9 as INT32 and precision 10–18 as INT64, including files produced by the current Arrow/Parquet writer.
Fix direction: when the Iceberg field type is decimal, convert INT32/INT64 page-index bounds to Int128, matching the row-group statistics path. Add regression coverage for inequality and IN predicates with row selection enabled.
To Reproduce
No response
Expected behavior
No response
Willingness to contribute
I can contribute a fix for this bug independently
- 主要言語
- Rust
- スター
- 1.4k
- フォーク
- 574
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 66
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg-rust のほかの issue
-
datafusion
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
apache/iceberg-rust#3297 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
apache/iceberg-rust#3285 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
apache/iceberg-rust#3280 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-rust#3234 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg-rust#3229 ·
メンテナーはふだん 1 日以内に返信
apache/iceberg-rust の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 3 日以内に返信
-
state:triage-needed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
Automattic/harper#4503 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 2 日以内に返信