pitrou commented on code in PR #34616:
URL: https://github.com/apache/arrow/pull/34616#discussion_r1329701359
##########
cpp/src/arrow/dataset/file_parquet.cc:
##########
@@ -67,8 +72,28 @@ parquet::ReaderProperties MakeReaderProperties(
properties.disable_buffered_stream();
}
properties.set_buffer_size(parquet_scan_options->reader_properties->buffer_size());
+
+#ifdef PARQUET_REQUIRE_ENCRYPTION
+ auto parquet_decrypt_config =
parquet_scan_options->parquet_decryption_config;
+
+ if (parquet_decrypt_config != nullptr) {
+ auto file_decryption_prop =
+ parquet_decrypt_config->crypto_factory->GetFileDecryptionProperties(
+ *parquet_decrypt_config->kms_connection_config,
+ *parquet_decrypt_config->decryption_config, path, filesystem);
+
+ parquet_scan_options->reader_properties->file_decryption_properties(
+ std::move(file_decryption_prop));
+ }
+#else
+ if (parquet_scan_options->parquet_decryption_config != nullptr) {
+ throw std::runtime_error("Encryption is not supported in this build.");
Review Comment:
We don't use exceptions in Arrow (as opposed to the base Parquet APIs), so
this function should return a `Result<parquet::ReaderProperties>` instead.
--
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]