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

Aperta
#19,075 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@Anurag-S1ngh ci sta già lavorando.

Dal 22/11/2026.

Valutazione

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

Direzione di ricerca

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.

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

Descrizione

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.

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.