Parquet: Handle signed zero consistently in dictionary row-group filtering

オープン
#18,886 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@adiranjan25 がすでに取り組んでいます。

2026年11月11日 から。

  • #18887 @adiranjan25 による — オープン

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
databases

調査の方向性

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 の本文から書いたものです。

説明

bug
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.0 and +0.0 should 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
  1. Inspect signed-zero comparisons in ParquetDictionaryRowGroupFilter, particularly equality, inequality, and range predicates.
  2. Reuse the signed-zero-aware comparison semantics introduced in PR #18813 where appropriate, without adding an unnecessary cross-module dependency.
  3. Add regression tests using dictionary-encoded float and double values, covering both signed-zero directions.
  4. Verify that predicate evaluation never incorrectly excludes a row group containing a matching value.
Related references

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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/iceberg のほかの issue

apache/iceberg の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。