Truncate projection does not include the wrapped partition at the type minimum

Abierto
#19,075 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@Anurag-S1ngh ya está trabajando en esto.

Desde el 22/11/2026.

Evaluación

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

Línea de trabajo

Start from ProjectionUtil.truncateInteger and truncateLong and compare them against TruncateUtil.truncateInt/truncateLong, which produce the wrapped value at the type minimum; the mismatch is only at the boundary values (-2147483648 for int, Long.MIN_VALUE for long). Read the existing projection unit tests for truncate transforms first, then add boundary cases that assert a LessThan/GreaterThan projection includes the wrapped partition. Done means the projection predicate and the writer's transform agree at the type minimum and the new boundary tests pass.

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

Descripción

What happens

ProjectionUtil.truncateInteger and truncateLong project < and > without accounting for the wrapped partition that TruncateUtil.truncateInt and truncateLong produce at the type minimum.

With truncate[1000] on an int column, values from -2147483648 to -2147483001 truncate to 2147483296. LessThan("x", 0) projects to x_trunc <= -1000, which excludes 2147483296, so those rows are pruned.

Why it matters

The writer already emits the wrapped value, so the read side misses real data. The Python implementation has the same gap: apache/iceberg-python#4407 fixes EqualTo and In and leaves the range projection unchanged; the range case needs the reference implementation first.

Expected

A filter that can match a value in the wrapped partition should include that partition in its projection.

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.