[R][Parquet] ParquetReaderProperties does not expose page_checksum_verification, so a corrupt page CRC reads silently
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 72/100
Línea de trabajo
Empieza en r/R/parquet.R alrededor de la clase ParquetReaderProperties, donde los accesores existentes de thrift_string_size_limit muestran el patrón a seguir; luego revisa las funciones cpp11 correspondientes en r/src/parquet.cpp y las exportaciones en NAMESPACE. Confirma que el getter y el setter de C++ en cpp/src/parquet/properties.h son accesibles desde el shim. Se considera terminado cuando la clase de R expone get y set de page_checksum_verification y leer datapage_v1-corrupt-checksum.parquet con esa opción activada produce un error. Antes de abrir un pull request, verifica primero si los mantenedores quieren este cambio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The R bindings do not expose page_checksum_verification, so an R user has no way to turn on page-CRC verification when reading Parquet. Arrow's own deliberately-corrupt test files are read without error.
C++ has the option and Python exposes it; only R does not.
| C++ | cpp/src/parquet/properties.h:148-150 — page_checksum_verification() / set_page_checksum_verification(bool check_crc), defaulting to false at line 166 |
| Python | python/pyarrow/parquet/core.py:269,325,346 — a documented page_checksum_verification=False parameter |
| R | r/R/parquet.R:656-682 — ParquetReaderProperties declares and implements only thrift_string_size_limit and thrift_container_size_limit |
Reproduction
Using the files parquet-testing ships expressly so readers can be shown to reject a bad CRC — datapage_v1-corrupt-checksum.parquet ("uncompressed INT32 columns in v1 data pages with a mismatching CRC") and rle-dict-uncompressed-corrupt-checksum.parquet:
library(arrow)
packageVersion("arrow") # 25.0.0, libarrow 25.0.0
nrow(read_parquet("datapage_v1-corrupt-checksum.parquet")) # 5120 -- no error
nrow(read_parquet("rle-dict-uncompressed-corrupt-checksum.parquet")) # 1000 -- no error
ls(ParquetReaderProperties$create())
#> [1] "class_title" "clone" "initialize" "pointer" "print" "set_pointer"
#> [7] "set_thrift_container_size_limit" "set_thrift_string_size_limit"
#> [9] "thrift_container_size_limit" "thrift_string_size_limit"
# no page_checksum_verification
Measured on linux/aarch64, R 4.5.3, arrow 25.0.0 / libarrow 25.0.0, with parquet-testing at e74785d85a4e (the cpp/submodules/parquet-testing commit at apache-arrow-25.0.0).
Why it matters
Reading without CRC verification is a reasonable default — it matches C++ and Python. The gap is that R offers no way to opt in, so an R pipeline cannot detect page-level corruption even when it wants to. Silent corruption is the failure mode page CRCs exist to prevent, and the files above exist to prove a reader catches it.
It also means Arrow's own conformance corpus cannot be used from R for its intended purpose: those two files are supposed to fail, and from R they are indistinguishable from the matching-CRC files beside them (datapage_v1-uncompressed-checksum.parquet, plain-dict-uncompressed-checksum.parquet).
Component(s)
R, Parquet
Sketch of a fix
Not offering a PR, but the shape looks small — two accessors alongside the existing thrift ones in r/R/parquet.R:
page_checksum_verification = function() {
parquet___arrow___ReaderProperties__get_page_checksum_verification(self)
},
set_page_checksum_verification = function(check_crc) {
parquet___arrow___ReaderProperties__set_page_checksum_verification(self, check_crc)
},
plus the two cpp11 shims in r/src/parquet.cpp forwarding to the existing C++ getter/setter, and a line each in the @description block and NAMESPACE. Happy to be told if there is a reason it was left out deliberately — #36997 touched the same class for a different reason and did not add it.
- Lenguaje dominante
- C++
- Estrellas
- 17.2k
- Forks
- 4.4k
- Merge medio
- 3 d 9 h
- PR fusionados (30 d)
- 70
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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/arrow
-
[C++][Python] IPC reader rejects a DictionaryEncoding without indexType, which the format allowsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoComponent: C++ Component: Python
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
[R] Silent loss of metadata integrity for date-time and numeric attributes in write_parquet()/read_parquet()Quizá libre de nuevo @james-finn-travers la tomó hace 8 días y no hay ningún pull request abierto. AbiertoComponent: R Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
apache/arrow#51695 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
[C++][Parquet] Plaintext-footer files written with AES_GCM_CTR_V1 record AES_GCM_V1 as the encryption algorithm and cannot be readPosiblemente ocupada @YusefSyed la tomó hace 8 días. AbiertoType: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
[R] Expose ignore_extra_columns and pad_short_rows CSV parse optionsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoComponent: R good-first-issue Type: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 2 días
-
Component: C++
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 2 días
Todos los issues de apache/arrow
Issues similares
-
Incorrect Link in README.mdPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
flameshot-org/flameshot#4996 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
utopia-rise/godot-jvm#1004 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
chore(build): TxCoordinator.cpp uses the deprecated shared_ptr atomic free functionsPosiblemente ocupada @w5jwp la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
aethersdr/AetherSDR#6368 · 1 comentario ·
Los mantenedores suelen responder en 1 día