adamreeve commented on code in PR #7111:
URL: https://github.com/apache/arrow-rs/pull/7111#discussion_r1999936575
##########
parquet/src/file/writer.rs:
##########
@@ -171,7 +183,30 @@ impl<W: Write + Send> SerializedFileWriter<W> {
/// Creates new file writer.
pub fn new(buf: W, schema: TypePtr, properties: WriterPropertiesPtr) ->
Result<Self> {
let mut buf = TrackedWrite::new(buf);
- Self::start_file(&mut buf)?;
+
+ #[cfg(feature = "encryption")]
+ let file_encryptor = match
properties.file_encryption_properties.as_ref() {
+ None => None,
+ Some(encryption_props) =>
Some(Arc::new(FileEncryptor::new(encryption_props.clone())?)),
+ };
+
+ #[cfg(feature = "encryption")]
+ if properties.file_encryption_properties.is_some() {
+ properties
+ .file_encryption_properties
+ .clone()
+ .unwrap()
+
.validate_encrypted_column_names(SchemaDescriptor::new(schema.clone()))?;
+ }
+
+ #[cfg(feature = "encryption")]
+ if let Some(ref file_encryption_properties) =
properties.file_encryption_properties {
+ if !file_encryption_properties.encrypt_footer() {
+ return Err(general_err!("Footer encryption is not supported
yet"));
Review Comment:
```suggestion
return Err(general_err!("Writing encrypted files with
plaintext footers is not supported yet"));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]