Skip to content

Commit a587553

Browse files
committed
Apply minor code review comments
1 parent fe98196 commit a587553

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎cpp/src/arrow/dataset/file_parquet_encryption_test.cc‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ namespace dataset {
5656
struct EncryptionTestParam {
5757
bool uniform_encryption; // false is using per-column keys
5858
bool concurrently;
59-
bool crypto_factory;
59+
bool use_crypto_factory;
6060
};
6161

6262
std::ostream& operator<<(std::ostream& os, const EncryptionTestParam& param) {
6363
os << (param.uniform_encryption ? "UniformEncryption" : "ColumnKeys") << " ";
6464
os << (param.concurrently ? "Threaded" : "Serial") << " ";
65-
os << (param.crypto_factory ? "CryptoFactory" : "PropertyKeys");
65+
os << (param.use_crypto_factory ? "CryptoFactory" : "PropertyKeys");
6666
return os;
6767
}
6868

@@ -112,7 +112,7 @@ class DatasetEncryptionTestBase : public testing::TestWithParam<EncryptionTestPa
112112
auto parquet_file_write_options =
113113
checked_pointer_cast<ParquetFileWriteOptions>(file_format->DefaultWriteOptions());
114114

115-
if (GetParam().crypto_factory) {
115+
if (GetParam().use_crypto_factory) {
116116
// Configure encryption keys via crypto factory.
117117
crypto_factory_ = std::make_shared<parquet::encryption::CryptoFactory>();
118118
auto kms_client_factory =
@@ -214,7 +214,7 @@ class DatasetEncryptionTestBase : public testing::TestWithParam<EncryptionTestPa
214214
// Set scan options.
215215
auto parquet_scan_options = std::make_shared<ParquetFragmentScanOptions>();
216216

217-
if (GetParam().crypto_factory) {
217+
if (GetParam().use_crypto_factory) {
218218
// Configure decryption keys via crypto factory.
219219
auto decryption_config =
220220
std::make_shared<parquet::encryption::DecryptionConfiguration>();
@@ -360,7 +360,7 @@ TEST_P(DatasetEncryptionTest, ReadSingleFile) {
360360
auto decryption_config =
361361
std::make_shared<parquet::encryption::DecryptionConfiguration>();
362362
std::shared_ptr<parquet::FileDecryptionProperties> file_decryption_properties;
363-
if (GetParam().crypto_factory) {
363+
if (GetParam().use_crypto_factory) {
364364
// Configure decryption keys via file decryption properties with crypto factory key
365365
// retriever.
366366
file_decryption_properties = crypto_factory_->GetFileDecryptionProperties(

‎cpp/src/parquet/file_reader.cc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ class SerializedFile : public ParquetFileReader::Contents {
637637

638638
std::string HandleAadPrefix(
639639
const std::shared_ptr<FileDecryptionProperties>& file_decryption_properties,
640-
EncryptionAlgorithm& algo);
640+
const EncryptionAlgorithm& algo);
641641

642642
void ParseMetaDataOfEncryptedFileWithPlaintextFooter(
643643
const std::shared_ptr<FileDecryptionProperties>& file_decryption_properties,
@@ -733,7 +733,7 @@ void SerializedFile::ParseMetaDataOfEncryptedFileWithPlaintextFooter(
733733

734734
std::string SerializedFile::HandleAadPrefix(
735735
const std::shared_ptr<FileDecryptionProperties>& file_decryption_properties,
736-
EncryptionAlgorithm& algo) {
736+
const EncryptionAlgorithm& algo) {
737737
std::string aad_prefix_in_properties = file_decryption_properties->aad_prefix();
738738
std::string aad_prefix = aad_prefix_in_properties;
739739
bool file_has_aad_prefix = algo.aad.aad_prefix.empty() ? false : true;

0 commit comments

Comments
 (0)