Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Row-group stats decode aborts the read on minimum-length BYTE_ARRAY decimal bounds

Abierto Apto para principiantes
#3,280 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
86/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust

Línea de trabajo

Comienza en crates/iceberg/src/arrow/schema.rs con get_parquet_stat_min_as_datum y get_parquet_stat_max_as_datum. Compara la rama decimal de BYTE_ARRAY con la rama FIXED_LEN_BYTE_ARRAY y su helper i128_from_be_bytes. Usa esa ruta en ambos sitios y añade cobertura de regresión para un límite decimal de BYTE_ARRAY de menos de 16 bytes, confirmando que la lectura del row group ya no se interrumpe.

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

Descripción

bug
Apache Iceberg Rust version

main@119fad92c891c95a7819d87e4195407b3f7c0578

Describe the bug

Surfaced during https://github.com/apache/iceberg-rust/pull/3247 (companion to #3264).

get_parquet_stat_min_as_datum / get_parquet_stat_max_as_datum in crates/iceberg/src/arrow/schema.rs decode BYTE_ARRAY decimal statistics with a strict 16-byte conversion:

PrimitiveLiteral::Int128(i128::from_be_bytes(bytes.try_into()?)),

Parquet stores BYTE_ARRAY decimals as variable-length, minimal-byte-count, big-endian two's-complement values, so a bound shorter than 16 bytes (the common case) makes try_into() error and the ? propagates it, aborting the entire row-group read before scan planning completes.

The FIXED_LEN_BYTE_ARRAY decimal arm immediately below already handles this correctly with the variable-length helper i128_from_be_bytes(bytes) and a graceful DataInvalid error. The BYTE_ARRAY arm should use the same path (both min and max sites).

This is the row-group counterpart to the page-index behavior in #3247: that PR degraded the same malformed-bound class to "skip pruning" at the page-index layer, but the row-group stats layer still hard-errors, so "a malformed bound aborts the read" is not closed end-to-end.

From format/spec.md:1549 (the Parquet physical-type mapping):

decimal(P,S) → P <= 9: int32, P <= 18: int64, fixed otherwise
Fixed must use the minimum number of bytes that can store P.

So the spec mandates exactly three encodings: int32, int64, or fixed (FIXED_LEN_BYTE_ARRAY, chosen by precision. binary/BYTE_ARRAY is not a conformant decimal encoding in Iceberg. So this is purely a defensive fix and lower priority.

To Reproduce

No response

Expected behavior

Fix direction: replace i128::from_be_bytes(bytes.try_into()?) with i128_from_be_bytes(bytes) (as the FIXED_LEN arm does) at both the min and max decimal-BYTE_ARRAY sites, and add regression coverage for a sub-16-byte BYTE_ARRAY decimal bound.

Willingness to contribute

I can contribute a fix for this bug independently

Lenguaje dominante
Rust
Estrellas
1.4k
Forks
574
Merge medio
1 d 20 h
PR fusionados (30 d)
65

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

Todos los issues de apache/iceberg-rust

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.