Parquet: Handle signed zero consistently in dictionary row-group filtering
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
Inspect ParquetDictionaryRowGroupFilter, focusing on equality, inequality, range, and set predicate comparisons. Read PR #18813 for the signed-zero semantics to reuse, then add dictionary-encoded float and double regression tests covering both signed-zero directions. Done means matching row groups are never incorrectly pruned; PR #18887 is already open against this issue.
索引モデルが issue の本文から書いたものです。
説明
Apache Iceberg version
None
Query engine
None
Please describe the bug 🐞
Bug description
ParquetDictionaryRowGroupFilter may incorrectly exclude row groups when evaluating predicates involving positive and negative floating-point zero.
Apache Iceberg's expression semantics treat -0.0 and +0.0 as equivalent for float and double predicate comparisons. However, the dictionary-filter implementation uses the literal comparator for equality, inequality, and dictionary membership checks.
Because Java's floating-point comparison ordering distinguishes the two signed-zero representations, this can produce incorrect filtering decisions.
Example scenario
Consider a Parquet row group where a dictionary-encoded float or double column contains -0.0.
A query predicate such as:
x = 0.0
should match rows containing -0.0.
However, when the dictionary filter evaluates the predicate using the default comparator, it may conclude that the dictionary does not contain a matching value and incorrectly skip the row group.
Expected behavior
-0.0and+0.0should compare as equivalent for Iceberg float and double predicates.- Dictionary filtering must not incorrectly prune row groups containing matching values.
- Equality, inequality, range comparisons, and set predicates should follow Iceberg's expression semantics.
Proposed investigation and fix
- Inspect signed-zero comparisons in
ParquetDictionaryRowGroupFilter, particularly equality, inequality, and range predicates. - Reuse the signed-zero-aware comparison semantics introduced in PR #18813 where appropriate, without adding an unnecessary cross-module dependency.
- Add regression tests using dictionary-encoded float and double values, covering both signed-zero directions.
- Verify that predicate evaluation never incorrectly excludes a row group containing a matching value.
Related references
- Issue #18723 — Signed-zero predicate-evaluation bug.
- PR #18813 — API predicate-evaluation fix.
- Discussion: https://github.com/apache/iceberg/pull/18813#issuecomment-6711400628
CC @Rishavbhattarai — thank you for identifying this additional case and offering to help test the follow-up.
This issue tracks the Parquet dictionary-filter investigation separately so that PR #18813 can remain focused on API predicate-evaluation correctness.
Willingness to contribute
- I can contribute a fix for this bug independently
- I would be willing to contribute a fix for this bug with guidance from the Iceberg community
- I cannot contribute a fix for this bug at this time
- 主要言語
- Java
- スター
- 9.4k
- フォーク
- 3.7k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 169
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
apache/iceberg のほかの issue
-
Spark: Test INSERT targets with computed IDENTIFIER expressions対応中かも @shivadarshan-devadiga が 8 日前に担当しました。 オープンimprovement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Core] TestAvroPartitionStatsHandler fails on Windows due to unclosed partition statistics scan対応中かも @Ankitkj1999 が 10 日前に担当しました。 オープン
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
Flink: JdbcLockFactory concurrent lock-table creation can fail with "table already exists" and restart the job対応中かも @adiranjan25 が 17 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
apache/iceberg#18797 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Core: TableMetadata.Builder allows adding encryption keys to v1/v2 tables対応中かも @yusufyildiz34 が 29 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
apache/iceberg#18632 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Kafka: Filter empty strings and whitespace in IcebergSinkConfig stringToList対応中かも @mohamed-elbrik が 34 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
hermes-queue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
chrisalunlloyd2-sudo/mindpalace#430 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
unitycatalog/unitycatalog#2363 ·
メンテナーはふだん 1 日以内に返信
-
area: editor P3 type: feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
halisonworks/mod-codeling#290 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
area/dependencies area/dependencies/js backport/26.6 backport/26.8 kind/cve severity/medium source/scan-dependencies status/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 2 日以内に返信