Row-group stats decode aborts the read on minimum-length BYTE_ARRAY decimal bounds
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
- Área
- data-engineering, databases
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
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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/iceberg-rust
-
Remove license clarification for zstd-sys once workspace upgrades zstd (zstd 0.14, zstd-sys 2.1)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
apache/iceberg-rust#3307 ·
Los mantenedores suelen responder en 1 día
-
datafusion
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/iceberg-rust#3297 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/iceberg-rust#3285 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/iceberg-rust#3234 · 2 reacciones ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/iceberg-rust#3229 ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/iceberg-rust
Issues similares
-
agent:triaged bug bughunt pm:npm priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
SocketDev/socket-patch#464 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
stellar/stellar-cli#2773 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día