Skip to content

fix: check for key retriever in Parquet decryption properties conversion - #24866

Open
adamreeve wants to merge 1 commit into
apache:mainfrom
adamreeve:key-retriever-check
Open

fix: check for key retriever in Parquet decryption properties conversion#24866
adamreeve wants to merge 1 commit into
apache:mainfrom
adamreeve:key-retriever-check

Conversation

@adamreeve

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Previously an error when retrieving the footer key was used as an indication that a key retriever was used, but this isn't reliable. A key retriever implementation might choose to return a footer key even if no key metadata is provided. This could mean that a footer key is set in the converted decryption properties but column keys are not correctly converted.

arrow-rs didn't previously expose whether a key retriever is used, but this was added in 59.0.0.

What changes are included in this PR?

Use the new FileDecryptionProperties::uses_key_retriever to determine whether FileDecryptionProperties uses a key retriever, rather than rely on getting an error when getting the footer key.

What is the testing strategy for this PR?

Updated existing unit test.

Are there any user-facing changes?

No, this changes an error message but should otherwise not affect users except if they had a key retriever implementation that would return footer keys without any metadata being provided.

@github-actions github-actions Bot added the common Related to common crate label Sep 1, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 81.61%. Comparing base (fefc227) to head (71a2832).

Files with missing lines Patch % Lines
datafusion/common/src/config.rs 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #24866      +/-   ##
==========================================
- Coverage   81.61%   81.61%   -0.01%     
==========================================
  Files        1123     1123              
  Lines      409392   409398       +6     
  Branches   409392   409398       +6     
==========================================
- Hits       334143   334124      -19     
- Misses      55630    55652      +22     
- Partials    19619    19622       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@adamreeve
adamreeve marked this pull request as ready for review September 2, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve conversion from FileDecryptionProperties to ConfigFileDecryptionProperties

2 participants