wgtmac commented on code in PR #36574:
URL: https://github.com/apache/arrow/pull/36574#discussion_r1338814429


##########
cpp/src/parquet/encryption/internal_file_decryptor.cc:
##########
@@ -215,4 +217,53 @@ std::shared_ptr<Decryptor> 
InternalFileDecryptor::GetColumnDecryptor(
   return column_data_map_[column_path];
 }
 
+namespace {
+
+std::shared_ptr<Decryptor> GetColumnDecryptor(
+    const ColumnCryptoMetaData* crypto_metadata, InternalFileDecryptor* 
file_decryptor,
+    const std::function<std::shared_ptr<Decryptor>(
+        InternalFileDecryptor* file_decryptor, const std::string& column_path,
+        const std::string& column_key_metadata, const std::string& aad)>& 
func) {
+  if (crypto_metadata == nullptr) {
+    return nullptr;
+  }
+
+  if (file_decryptor == nullptr) {
+    throw ParquetException("RowGroup is noted as encrypted but no file 
decryptor");
+  }
+
+  if (crypto_metadata->encrypted_with_footer_key()) {
+    return file_decryptor->GetFooterDecryptorForColumnMeta();

Review Comment:
   Good catch! Sorry for the mistake made by the copy-and-paste.



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