EnricoMi commented on code in PR #44990:
URL: https://github.com/apache/arrow/pull/44990#discussion_r1945063454


##########
cpp/src/parquet/column_reader.cc:
##########
@@ -333,14 +340,16 @@ void SerializedPageReader::InitDecryption() {
   // Prepare the AAD for quick update later.
   if (crypto_ctx_.data_decryptor != nullptr) {
     ARROW_DCHECK(!crypto_ctx_.data_decryptor->file_aad().empty());
+    data_decryptor_ = std::make_shared<Decryptor>(*crypto_ctx_.data_decryptor);

Review Comment:
   With `std::function<std::shared_ptr<Decryptor>()> GetColumnDataDecryptor` 
you are implying `CryptoContext` stores that factory rather than a 
`std::shared_ptr<Decryptor> data_decryptor`, so we can create a new data 
decryptor each time we call `InitDecryption`?



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to