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

Abierto
#18,886 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@adiranjan25 ya está trabajando en esto.

Desde el 11/11/2026.

  • #18887 de @adiranjan25 — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
java
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
Java
Estrellas
9.4k
Forks
3.7k
Merge medio
2 d 15 h
PR fusionados (30 d)
169

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/iceberg

Todos los issues de apache/iceberg

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.