adamreeve commented on code in PR #7111:
URL: https://github.com/apache/arrow-rs/pull/7111#discussion_r2003758011


##########
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()))?;
+        }

Review Comment:
   Oh I see you added the `Arc::new(`. Yeah that's needed, although the 
`schema.clone()` should be able to just be `schema`.



-- 
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]

Reply via email to