This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new 73ad4926d9 feat: Make parquet_encryption a non-default feature (#17137)
73ad4926d9 is described below

commit 73ad4926d9b8a10ae8fdec16cf6bf66f7b59fc1c
Author: miro <h...@miro.im>
AuthorDate: Sat Aug 23 03:50:25 2025 +0800

    feat: Make parquet_encryption a non-default feature (#17137)
    
    * feat: Make parquet_encryption a non-default feature
    
    * fix: enable parquet_encryption for sqllogictest
    
    * fix: enable parquet_encryption for datafusion-examples
    
    * fmt
    
    * fix: update features list in README
    
    * update: add parquet_encryption checks to CI workflow
    
    * update parquet_encryption dependencies in Cargo.toml and  CI workflow
    
    * revert unecessary cargo changes
    
    ---------
    
    Co-authored-by: Andrew Lamb <and...@nerdnetworks.org>
---
 .github/workflows/rust.yml         | 2 +-
 README.md                          | 2 +-
 datafusion-cli/Cargo.toml          | 1 +
 datafusion-examples/Cargo.toml     | 2 +-
 datafusion/common/src/config.rs    | 4 ++++
 datafusion/core/Cargo.toml         | 3 +--
 datafusion/sqllogictest/Cargo.toml | 2 +-
 7 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 25ab0a6c6f..d03bbe43f7 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -294,7 +294,7 @@ jobs:
             --lib \
             --tests \
             --bins \
-            --features serde,avro,json,backtrace,integration-tests
+            --features 
serde,avro,json,backtrace,integration-tests,parquet_encryption
       - name: Verify Working Directory Clean
         run: git diff --exit-code
 
diff --git a/README.md b/README.md
index 8c92d0780f..9c3f6190c0 100644
--- a/README.md
+++ b/README.md
@@ -118,7 +118,6 @@ Default features:
 - `datetime_expressions`: date and time functions such as `to_timestamp`
 - `encoding_expressions`: `encode` and `decode` functions
 - `parquet`: support for reading the [Apache Parquet] format
-- `parquet_encryption`: support for using [Parquet Modular Encryption]
 - `regex_expressions`: regular expression functions, such as `regexp_match`
 - `unicode_expressions`: Include unicode aware functions such as 
`character_length`
 - `unparser`: enables support to reverse LogicalPlans back into SQL
@@ -128,6 +127,7 @@ Optional features:
 
 - `avro`: support for reading the [Apache Avro] format
 - `backtrace`: include backtrace information in error messages
+- `parquet_encryption`: support for using [Parquet Modular Encryption]
 - `pyarrow`: conversions between PyArrow and DataFusion types
 - `serde`: enable arrow-schema's `serde` feature
 
diff --git a/datafusion-cli/Cargo.toml b/datafusion-cli/Cargo.toml
index 994c8cc8f2..3d845f6ac4 100644
--- a/datafusion-cli/Cargo.toml
+++ b/datafusion-cli/Cargo.toml
@@ -47,6 +47,7 @@ datafusion = { workspace = true, features = [
     "encoding_expressions",
     "nested_expressions",
     "parquet",
+    "parquet_encryption",
     "recursive_protection",
     "regex_expressions",
     "unicode_expressions",
diff --git a/datafusion-examples/Cargo.toml b/datafusion-examples/Cargo.toml
index f12bd9202e..d847db6165 100644
--- a/datafusion-examples/Cargo.toml
+++ b/datafusion-examples/Cargo.toml
@@ -66,7 +66,7 @@ bytes = { workspace = true }
 dashmap = { workspace = true }
 # note only use main datafusion crate for examples
 base64 = "0.22.1"
-datafusion = { workspace = true, default-features = true }
+datafusion = { workspace = true, default-features = true, features = 
["parquet_encryption"] }
 datafusion-ffi = { workspace = true }
 datafusion-physical-expr-adapter = { workspace = true }
 datafusion-proto = { workspace = true }
diff --git a/datafusion/common/src/config.rs b/datafusion/common/src/config.rs
index bec471bfe4..bc0c47d1c3 100644
--- a/datafusion/common/src/config.rs
+++ b/datafusion/common/src/config.rs
@@ -671,6 +671,8 @@ config_namespace! {
 
 config_namespace! {
     /// Options for configuring Parquet Modular Encryption
+    ///
+    /// To use Parquet encryption, you must enable the `parquet_encryption` 
feature flag, as it is not activated by default.
     pub struct ParquetEncryptionOptions {
         /// Optional file decryption properties
         pub file_decryption: Option<ConfigFileDecryptionProperties>, default = 
None
@@ -1880,6 +1882,8 @@ pub struct TableParquetOptions {
     /// ```
     pub key_value_metadata: HashMap<String, Option<String>>,
     /// Options for configuring Parquet modular encryption
+    ///
+    /// To use Parquet encryption, you must enable the `parquet_encryption` 
feature flag, as it is not activated by default.
     /// See ConfigFileEncryptionProperties and ConfigFileDecryptionProperties 
in datafusion/common/src/config.rs
     /// These can be set via 'format.crypto', for example:
     /// ```sql
diff --git a/datafusion/core/Cargo.toml b/datafusion/core/Cargo.toml
index f1f220f105..b87a3c93d8 100644
--- a/datafusion/core/Cargo.toml
+++ b/datafusion/core/Cargo.toml
@@ -62,7 +62,6 @@ default = [
     "unicode_expressions",
     "compression",
     "parquet",
-    "parquet_encryption",
     "recursive_protection",
 ]
 encoding_expressions = ["datafusion-functions/encoding_expressions"]
@@ -71,7 +70,7 @@ force_hash_collisions = 
["datafusion-physical-plan/force_hash_collisions", "data
 math_expressions = ["datafusion-functions/math_expressions"]
 parquet = ["datafusion-common/parquet", "dep:parquet", 
"datafusion-datasource-parquet"]
 parquet_encryption = [
-    "dep:parquet",
+    "parquet",
     "parquet/encryption",
     "datafusion-common/parquet_encryption",
     "datafusion-datasource-parquet/parquet_encryption",
diff --git a/datafusion/sqllogictest/Cargo.toml 
b/datafusion/sqllogictest/Cargo.toml
index 989bce59e0..1e38c147e0 100644
--- a/datafusion/sqllogictest/Cargo.toml
+++ b/datafusion/sqllogictest/Cargo.toml
@@ -43,7 +43,7 @@ bigdecimal = { workspace = true }
 bytes = { workspace = true, optional = true }
 chrono = { workspace = true, optional = true }
 clap = { version = "4.5.44", features = ["derive", "env"] }
-datafusion = { workspace = true, default-features = true, features = ["avro"] }
+datafusion = { workspace = true, default-features = true, features = ["avro", 
"parquet_encryption"] }
 datafusion-spark = { workspace = true, default-features = true }
 datafusion-substrait = { workspace = true, default-features = true }
 futures = { workspace = true }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org
For additional commands, e-mail: commits-h...@datafusion.apache.org

Reply via email to