Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parquet Modular encryption support #7111

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ rust-version = { workspace = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
ahash = { version = "0.8", default-features = false, features = ["compile-time-rng"] }
# See https://github.com/briansmith/ring/issues/918#issuecomment-2077788925
ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js", "std"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ahash = { version = "0.8", default-features = false, features = ["runtime-rng"] }
Expand Down Expand Up @@ -70,6 +72,7 @@ half = { version = "2.1", default-features = false, features = ["num-traits"] }
sysinfo = { version = "0.33.0", optional = true, default-features = false, features = ["system"] }
crc32fast = { version = "1.4.2", optional = true, default-features = false }
simdutf8 = { version = "0.1.5", optional = true, default-features = false }
ring = { version = "0.17", default-features = false, features = ["std"], optional = true }

[dev-dependencies]
base64 = { version = "0.22", default-features = false, features = ["std"] }
Expand Down Expand Up @@ -123,6 +126,8 @@ sysinfo = ["dep:sysinfo"]
crc = ["dep:crc32fast"]
# Enable SIMD UTF-8 validation
simdutf8 = ["dep:simdutf8"]
# Enable Parquet modular encryption support
encryption = ["dep:ring"]


[[example]]
Expand Down
9 changes: 8 additions & 1 deletion parquet/examples/read_with_rowgroup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,12 @@ async fn main() -> Result<()> {
let mut file = File::open(&path).await.unwrap();

// The metadata could be cached in other places, this example only shows how to read
let metadata = file.get_metadata().await?;
let metadata = file
.get_metadata(
#[cfg(feature = "encryption")]
None,
)
.await?;

for rg in metadata.row_groups() {
let mut rowgroup = InMemoryRowGroup::create(rg.clone(), ProjectionMask::all());
Expand Down Expand Up @@ -121,6 +126,8 @@ impl RowGroups for InMemoryRowGroup {
self.metadata.column(i),
self.num_rows(),
None,
#[cfg(feature = "encryption")]
None,
)?);

Ok(Box::new(ColumnChunkIterator {
Expand Down
Loading
Loading