Skip to content

Commit

Permalink
chore: rename to EncryptedFooter
Browse files Browse the repository at this point in the history
  • Loading branch information
srh committed Sep 12, 2024
1 parent 04f21c3 commit 25d90d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion parquet/src/file/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub enum ParquetEncryptionMode {
Unencrypted,
/// Means the file is encrypted with encrypted footer mode. The same
/// key is used for all the columns too, in this implementation.
FooterEncrypted(ParquetEncryptionKeyInfo),
EncryptedFooter(ParquetEncryptionKeyInfo),
}

/// Describes general parquet encryption configuration -- new files are encrypted with the
Expand Down
4 changes: 2 additions & 2 deletions parquet/src/file/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fn select_key(
for mode in read_keys {
match mode {
ParquetEncryptionMode::Unencrypted => {}
ParquetEncryptionMode::FooterEncrypted(key_info) => {
ParquetEncryptionMode::EncryptedFooter(key_info) => {
if key_info.key.compute_key_hash() == key_id_arr {
return Ok(key_info.key);
}
Expand Down Expand Up @@ -128,7 +128,7 @@ pub fn parse_metadata<R: ChunkReader>(
config
.read_keys()
.iter()
.any(|m| matches!(m, ParquetEncryptionMode::FooterEncrypted(_)))
.any(|m| matches!(m, ParquetEncryptionMode::EncryptedFooter(_)))
});
if !has_keys {
return Err(general_err!(
Expand Down
4 changes: 2 additions & 2 deletions parquet/src/file/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ mod tests {
file_writer.close().unwrap();

let encryption_config = encryption_info.map(|(key_info, _)| {
ParquetEncryptionConfig::new(vec![ParquetEncryptionMode::FooterEncrypted(
ParquetEncryptionConfig::new(vec![ParquetEncryptionMode::EncryptedFooter(
key_info,
)])
.unwrap()
Expand Down Expand Up @@ -1484,7 +1484,7 @@ mod tests {

let reading_cursor = crate::file::serialized_reader::SliceableCursor::new(buffer);
let encryption_config = encryption_info.map(|(key_info, _)| {
ParquetEncryptionConfig::new(vec![ParquetEncryptionMode::FooterEncrypted(
ParquetEncryptionConfig::new(vec![ParquetEncryptionMode::EncryptedFooter(
key_info,
)])
.unwrap()
Expand Down

0 comments on commit 25d90d6

Please sign in to comment.