Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Page-index pruning can drop rows for INT32/INT64-encoded decimals

Chiusa
#3,264 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Look at PageIndexEvaluator::apply_predicate_to_column_index in the codebase. Understand how it constructs INT32/INT64 page bounds. Compare with get_parquet_stat_min_as_datum for decimal handling. The fix is to convert those bounds to Int128 for decimal fields. Write tests for inequality and IN predicates with row selection enabled, likely in the test suite for page index pruning.

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

Descrizione

bug
Apache Iceberg Rust version

main @ https://github.com/apache/iceberg-rust/commit/e694eea42032a3f0898ccee33f5d3dd0ca9cd24b

Describe the bug

Surfaced during https://github.com/apache/iceberg-rust/pull/3247#pullrequestreview-5282630063

PageIndexEvaluator::apply_predicate_to_column_index constructs INT32 and INT64 page bounds as PrimitiveLiteral::Int and PrimitiveLiteral::Long, regardless of the Iceberg field type.

For decimal fields, query datums use PrimitiveLiteral::Int128. Datum::partial_cmp only compares decimal datums when both literals are Int128, so comparisons between these page bounds and query datums return None.

This can silently prune matching pages when page-index row selection is enabled:

  • Inequality predicates (<, <=, >, >=) treat the failed comparison as false and reject the page.
  • IN can conclude that no literal is within the page bounds and reject the page.
  • Equality currently fails open and retains the page.

The row-group statistics path already handles these encodings correctly: get_parquet_stat_min_as_datum (and max) convert decimal Statistics::Int32 and Statistics::Int64 values to PrimitiveLiteral::Int128.

Parquet commonly encodes decimal precision ≤9 as INT32 and precision 10–18 as INT64, including files produced by the current Arrow/Parquet writer.

Fix direction: when the Iceberg field type is decimal, convert INT32/INT64 page-index bounds to Int128, matching the row-group statistics path. Add regression coverage for inequality and IN predicates with row selection enabled.

To Reproduce

No response

Expected behavior

No response

Willingness to contribute

I can contribute a fix for this bug independently

Lingua principale
Rust
Stelle
1.4k
Fork
604
Merge medio
5g 11h
PR unite (30g)
59

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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-rust

Tutte le issue di apache/iceberg-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.