Commit 6965fd3
feat: Add a configuration to make parquet encryption optional (#16649)
* Initial commit to form PR for datafusion encryption support
* Add tests for encryption configuration
* Apply cargo fmt
* Add a roundtrip encryption test to the parquet tests.
* cargo fmt
* Update test to add decryption parameter to called functions.
* Try to get DataFrame.write_parquet to work with encryption. Doesn't quite, column encryption is broken.
* Update datafusion/datasource-parquet/src/opener.rs
Co-authored-by: Adam Reeve <[email protected]>
* Update datafusion/datasource-parquet/src/source.rs
Co-authored-by: Adam Reeve <[email protected]>
* Fix write test in parquet.rs
* Simplify encryption test. Remove unused imports.
* Run cargo fmt.
* Further streamline roundtrip test.
* Change From methods for FileEncryptionProperties and FileDecryptionProperties to use references.
* Change encryption config to directly hold column keys using custom config fields.
* Fix generated field names in visit for encryptor and decryptor to use "." instead of "::"
* 1. Disable parallel writes with enccryption.
2. Fixed unused header warning in config.rs.
3. Fix test case in encryption.rs to call conversion to ConfigFileDecryption properties correctly.
* cargo fmt
* Update datafusion/common/src/file_options/parquet_writer.rs
Co-authored-by: Copilot <[email protected]>
* fix variables shown in information schema test.
* Backout bad suggestion from copilot
* Remove unused serde reference
Add an example to read and write encrypted parquet files.
* cargo fmt
* change file_format.rs to use global encryption options in struct.
* Turn off page_index for encrypted example. Get encrypted example working with filter.
* Tidy up example output.
* Add missing license. Run taplo format
* Update configs.md by running dev/update_config_docs.sh
* Cargo fmt + clippy changes.
* Add filter test for encrypted files.
* Cargo clippy changes.
* Fix link in README.md
* Add issue tag for parallel writes.
* Move file encryption and decryption properties out of global options
* Use config_namespace_with_hashmap for column encryption/decryption props
* Remove outdated docs on crypto settings.
Signed-off-by: Corwin Joy <[email protected]>
* 1. Add docs for using encryption configuration.
2. Add example SQL for using encryption from CLI.
3. Fix removed variables in test for configuration information.
4. Clippy and cargo fmt.
Signed-off-by: Corwin Joy <[email protected]>
* Update code to add missing ParquetOpener parameter due to merge from main
Signed-off-by: Corwin Joy <[email protected]>
* Add CLI documentation for Parquet options and provide an encryption example
Signed-off-by: Corwin Joy <[email protected]>
* Use ConfigFileDecryptionProperties in ParquetReadOptions
Signed-off-by: Adam Reeve <[email protected]>
* Implement default for ConfigFileEncryptionProperties
Signed-off-by: Corwin Joy <[email protected]>
* Add sqllogictest for parquet with encryption
Signed-off-by: Corwin Joy <[email protected]>
* Apply prettier changes from CI
Signed-off-by: Corwin Joy <[email protected]>
* Begin adding config for encryption.
* Fix merge errors.
* Fix config dependency in datafusion/core/Cargo.toml
* ci reformat
* Fix missing Cargo dependency.
* Update Cargo.toml
Co-authored-by: Copilot <[email protected]>
* Revert bad suggestion from copilot
Signed-off-by: Corwin Joy <[email protected]>
* taplo format Cargo.toml
Signed-off-by: Corwin Joy <[email protected]>
* 1. Add CI test for parquet_encryption. 2. Document new configuration
Signed-off-by: Corwin Joy <[email protected]>
* Refactor cfg parquet_encryption feature into a few functions defined in encryption.rs
Signed-off-by: Corwin Joy <[email protected]>
* Remove #allow(unusued) that is no longer needed
Signed-off-by: Corwin Joy <[email protected]>
* cargo fmt
Signed-off-by: Corwin Joy <[email protected]>
* Fix error when cfg parquet_encryption is disabled.
Signed-off-by: Corwin Joy <[email protected]>
* cargo fmt
Signed-off-by: Corwin Joy <[email protected]>
* Remove unused mut.
Signed-off-by: Corwin Joy <[email protected]>
---------
Signed-off-by: Corwin Joy <[email protected]>
Signed-off-by: Adam Reeve <[email protected]>
Co-authored-by: Adam Reeve <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Adam Reeve <[email protected]>1 parent 04b006c commit 6965fd3
File tree
17 files changed
+155
-51
lines changed- .github/workflows
- datafusion
- common
- src
- file_options
- core
- src
- dataframe
- test
- tests/parquet
- datasource-parquet
- src
17 files changed
+155
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
221 | 223 | | |
222 | 224 | | |
223 | 225 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| 123 | + | |
123 | 124 | | |
124 | 125 | | |
125 | 126 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
32 | | - | |
| 34 | + | |
33 | 35 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
2148 | 2146 | | |
2149 | 2147 | | |
2150 | 2148 | | |
2151 | | - | |
| 2149 | + | |
2152 | 2150 | | |
2153 | 2151 | | |
2154 | 2152 | | |
| |||
2194 | 2192 | | |
2195 | 2193 | | |
2196 | 2194 | | |
2197 | | - | |
| 2195 | + | |
2198 | 2196 | | |
2199 | 2197 | | |
2200 | 2198 | | |
| |||
2308 | 2306 | | |
2309 | 2307 | | |
2310 | 2308 | | |
2311 | | - | |
| 2309 | + | |
2312 | 2310 | | |
2313 | 2311 | | |
2314 | 2312 | | |
| |||
2342 | 2340 | | |
2343 | 2341 | | |
2344 | 2342 | | |
2345 | | - | |
| 2343 | + | |
2346 | 2344 | | |
2347 | 2345 | | |
2348 | 2346 | | |
| |||
2688 | 2686 | | |
2689 | 2687 | | |
2690 | 2688 | | |
2691 | | - | |
| 2689 | + | |
2692 | 2690 | | |
2693 | 2691 | | |
2694 | 2692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 104 | + | |
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
| |||
456 | 453 | | |
457 | 454 | | |
458 | 455 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
465 | 460 | | |
466 | 461 | | |
467 | 462 | | |
| |||
590 | 585 | | |
591 | 586 | | |
592 | 587 | | |
593 | | - | |
594 | | - | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
595 | 592 | | |
596 | 593 | | |
597 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
| |||
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
| 138 | + | |
130 | 139 | | |
131 | 140 | | |
132 | 141 | | |
| |||
0 commit comments