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

Aperta
#18,886 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@adiranjan25 ci sta già lavorando.

Dal 11/11/2026.

  • #18887 di @adiranjan25 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
databases

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Java
Stelle
9.4k
Fork
3.7k
Merge medio
2g 15h
PR unite (30g)
169

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/iceberg

Tutte le issue di apache/iceberg

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.