cvp2004 opened a new pull request, #55831: URL: https://github.com/apache/arrow/pull/55831
### Rationale for this change R users can't enable Parquet page CRC verification. `ParquetReaderProperties` only exposes the Thrift size limits, while C++ (`ReaderProperties::set_page_checksum_verification`) and Python (`page_checksum_verification=`) already support it. As a result, files with corrupt page checksums, such as parquet-testing's `datapage_v1-corrupt-checksum.parquet`, are read silently. ### What changes are included in this PR? - `ParquetReaderProperties$page_checksum_verification()` and `$set_page_checksum_verification()` in R, bound to the existing C++ `ReaderProperties` methods. The default stays `FALSE`. - Regenerated `arrowExports` (via `data-raw/codegen.R`) and `ParquetReaderProperties.Rd` (via roxygen). This picks up the earlier attempt in #53289, which was closed automatically by the open-PR limit rather than reviewed. Before starting, I asked the previous claimant on the issue whether they were still working on it, and I haven't had a reply yet. Exposing the option through `read_parquet()` or `ParquetFragmentScanOptions`, which already takes the Thrift limits, is left out of this PR to keep it small. It could be a follow-up. ### Are these changes tested? Yes. A new test in `test-parquet.R` checks that the default is `FALSE` and the setter round-trips. On `datapage_v1-corrupt-checksum.parquet`, it checks that reading with the defaults returns all 5120 rows, and that with verification on, `ReadTable()` errors with `CRC checksum verification failed`. Local results (Windows 11, R 4.5.3, nightly libarrow 26.0.1.100000151): - `devtools::test(filter = "parquet")`: 109 passed, 0 failed, 0 skipped (with `ARROW_SOURCE_HOME` set so the parquet-testing data is found). - Ablation: with the C++ setter call removed, both new assertions fail. - air, jarl, clang-format and cpplint pass on the changed files. I did not run the full R test suite locally. ### Are there any user-facing changes? Yes: two new methods on `ParquetReaderProperties`. Default behavior is unchanged. ### Was AI used for this PR? In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR. The code, test and this description were generated with an AI coding assistant. I reviewed the diff before submitting. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [x] Human - [ ] AI - [ ] Not reviewed * GitHub Issue: #53138 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
