Repository navigation
Conversation
- Honor DuckLake's Parquet V1 default and reject encrypted V2 - Generate and persist a fresh PME key for every output file - Verify raw-key failure, compaction re-keying, and DuckDB reads
faysou
requested review from
anoop-narang,
shefeek-jinnah and
zfarrell
as code owners
November 23, 2026 16:12
Start a new CI run after the hosted macOS job was canceled.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Encrypt each new Parquet data or delete file when the catalog's
encryptedoption istrue. Buffered, streaming, partitioned, flush, and compaction writes generate a fresh key perphysical file and store it in the file's catalog commit. Builds without the
encryptionfeaturerefuse operations that would write Parquet to an encrypted catalog.
Encrypted Parquet write
flowchart LR Write["Write, flush, delete, or compact"] --> Key["Generate a fresh key per Parquet file"] Key --> File["Write encrypted Parquet"] File --> Stats["Read footer statistics using that key"] Stats --> Commit["Commit file metadata and encryption key"] Commit --> Read["DuckDB opens the catalog and decrypts the file"]Verification
encrypted_writes_flush_delete_and_rewriteexercises flush, positional delete, andcompaction in a SQLite-backed catalog. It checks distinct catalog keys and verifies that
reading without a key fails. DuckDB 2.0.1 reads the remaining values, 7 and 13.
Specification proof
Reference implementation
DuckDB's DuckLake extension supplies encryption configuration to Parquet COPY and uses an
encryption key when writing positional deletes. This PR applies the same catalog contract
to the Rust writer and records each file's key when it publishes the file.
Parquet COPY encryption configuration,
Delete write encryption key.
The DuckDB 2.0.1 round-trip also exercises the encrypted DataPageV2 reader fix.
DuckDB DataPageV2 fix.