gitedmond opened a new pull request, #53289:
URL: https://github.com/apache/arrow/pull/53289

   ### Rationale for this change
   
   Fixes #53138. R users cannot enable Parquet page-checksum verification even 
though C++ already supports it. The corrupt-checksum fixtures therefore read 
successfully, with no R option to detect the mismatched CRCs.
   
   ### What changes are included in this PR?
   
   - Add getter and setter methods to `ParquetReaderProperties`, forwarding to 
the existing C++ option, and regenerate the binding registration code.
   - Add regression coverage for the default, enabling and disabling 
verification, both corrupt-checksum fixtures, valid checksums, and files 
without checksums.
   - Document the methods and show how to pass the configured properties to 
`read_parquet()`.
   
   The changes are split into three focused commits: bindings, regression 
tests, and documentation.
   
   ### Are these changes tested?
   
   - Built the unmodified R bindings and reproduced the reported reads: 5,120 
and 1,000 rows from the two corrupt-checksum fixtures.
   - Both new test blocks fail against the unmodified bindings and pass after 
the change (12 assertions). With verification enabled, both fixtures raise `CRC 
checksum verification failed`.
   - The complete `test-parquet.R` selection passes 114 assertions with no 
failures or errors; two existing CRAN-skipped tests are skipped.
   - The documentation example runs successfully, and rerunning the binding 
generator produces no further changes.
   
   Validation used R 4.3.3, Arrow R 25.0.1.9000, and Arrow C++ 26.0.0-SNAPSHOT.
   
   ### Are there any user-facing changes?
   
   R users can opt in with:
   
   ```r
   reader_props <- ParquetReaderProperties$create()
   reader_props$set_page_checksum_verification(TRUE)
   read_parquet("data.parquet", reader_props = reader_props)
   ```
   
   Verification remains disabled by default. When enabled, existing page 
checksums are checked; files without page checksums remain readable.
   
   ### Was AI used for this PR?
   
   Codex assisted with the investigation, implementation, regression tests, 
documentation, validation, and PR description, and reviewed the changes before 
submission.
   
   **PR code and description written by:**
   
   - [ ] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [ ] Human
   - [x] AI
   - [ ] Not reviewed
   


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

Reply via email to