File tree 1 file changed +4
-5
lines changed
parquet/src/file/metadata
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -636,22 +636,21 @@ impl MetadataObjectWriter {
636
636
}
637
637
638
638
fn get_footer_encryption_algorithm ( & self ) -> Option < EncryptionAlgorithm > {
639
- let file_encryptor = self . file_encryptor . as_ref ( ) . unwrap ( ) ;
640
- if !file_encryptor. properties ( ) . encrypt_footer ( ) {
639
+ if let Some ( file_encryptor) = & self . file_encryptor {
641
640
let supply_aad_prefix = file_encryptor
642
641
. properties ( )
643
642
. aad_prefix ( )
644
643
. map ( |_| !file_encryptor. properties ( ) . store_aad_prefix ( ) ) ;
645
- let encryption_algorithm = Some ( EncryptionAlgorithm :: AESGCMV1 ( AesGcmV1 {
644
+ let encryption_algorithm = EncryptionAlgorithm :: AESGCMV1 ( AesGcmV1 {
646
645
aad_prefix : if file_encryptor. properties ( ) . store_aad_prefix ( ) {
647
646
file_encryptor. properties ( ) . aad_prefix ( ) . cloned ( )
648
647
} else {
649
648
None
650
649
} ,
651
650
aad_file_unique : Some ( file_encryptor. aad_file_unique ( ) . clone ( ) ) ,
652
651
supply_aad_prefix,
653
- } ) ) ;
654
- return encryption_algorithm;
652
+ } ) ;
653
+ return Some ( encryption_algorithm) ;
655
654
}
656
655
None
657
656
}
You can’t perform that action at this time.
0 commit comments