[R][Parquet] ParquetReaderProperties does not expose page_checksum_verification, so a corrupt page CRC reads silently
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #53289 di @gitedmond — chiusa senza merge
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
Direzione di ricerca
Inizia da r/R/parquet.R intorno alla classe ParquetReaderProperties, dove gli accessori esistenti di thrift_string_size_limit mostrano il pattern da seguire, poi controlla le funzioni cpp11 corrispondenti in r/src/parquet.cpp e gli export in NAMESPACE. Verifica che il getter e il setter C++ in cpp/src/parquet/properties.h siano raggiungibili dallo shim. Il lavoro è completo quando la classe R espone get e set di page_checksum_verification e la lettura di datapage_v1-corrupt-checksum.parquet con questa opzione attiva genera un errore. Prima di aprire una pull request, chiedi se i maintainer vogliono questa modifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- C++
- Stelle
- 17.2k
- Fork
- 4.4k
- Merge medio
- 3g 4h
- PR unite (30g)
- 66
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/arrow
-
[C++] Remove an unnecessary null pointer checkForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComponent: C++ Type: enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[C++][Python] IPC reader rejects a DictionaryEncoding without indexType, which the format allowsForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComponent: C++ Component: Python Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
[R] Silent loss of metadata integrity for date-time and numeric attributes in write_parquet()/read_parquet()Forse di nuovo libera @james-finn-travers l’ha presa 13 giorni fa e non c’è nessuna pull request aperta. ApertaComponent: R Type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/arrow#51695 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[C++][Parquet] Plaintext-footer files written with AES_GCM_CTR_V1 record AES_GCM_V1 as the encryption algorithm and cannot be readForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaType: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
[R] Expose ignore_extra_columns and pad_short_rows CSV parse optionsForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComponent: R good-first-issue Type: enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/arrow#51659 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/arrow
Issue simili
-
[Cleanup] Include the public header in work_split.cppForse già presa @blozano-tt l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
tenstorrent/tt-metal#60850 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
beehive-lab/TornadoVM#1248 ·
I maintainer di solito rispondono entro 1 giorno
-
core: RAC_LLM_OPTIONS_DEFAULT.min_p disagrees with the IDL's annotated defaultForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug core p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
RunanywhereAI/runanywhere-sdks#1083 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
tesseract-ocr/tesseract#4653 ·
I maintainer di solito rispondono entro 1 giorno
-
area: docs eco: cpp good first issue help wanted lane: free-agent roadmap size: XS type: docs
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
arminazimi/evergreen#475 ·
I maintainer di solito rispondono entro 1 giorno