From 26cfd6391364d812f128515c2b4e1c55b468babe Mon Sep 17 00:00:00 2001 From: Rok Mihevc Date: Sun, 2 Jun 2024 16:12:21 +0200 Subject: [PATCH] TODO --- cpp/src/parquet/file_writer.cc | 38 ---------------------------------- 1 file changed, 38 deletions(-) diff --git a/cpp/src/parquet/file_writer.cc b/cpp/src/parquet/file_writer.cc index 053a1758e3c2c..b36067db5d2c7 100644 --- a/cpp/src/parquet/file_writer.cc +++ b/cpp/src/parquet/file_writer.cc @@ -567,44 +567,6 @@ void WriteEncryptedFileMetadata(const FileMetaData& file_metadata, } } -// TODO: remove -// void WriteEncryptedMetadataFile2( -// const FileMetaData& metadata, std::shared_ptr<::arrow::io::OutputStream> sink, -// std::shared_ptr file_encryption_properties) { -// auto file_encryptor = std::make_unique( -// file_encryption_properties.get(), ::arrow::default_memory_pool()); -// -// if (file_encryption_properties->encrypted_footer()) { -// PARQUET_THROW_NOT_OK(sink->Write(kParquetEMagic, 4)); -// } else { -// // Encrypted file with plaintext footer mode. -// PARQUET_THROW_NOT_OK(sink->Write(kParquetMagic, 4)); -// } -// -// if (file_encryption_properties->encrypted_footer()) { -// PARQUET_ASSIGN_OR_THROW(int64_t position, sink->Tell()); -// uint64_t metadata_start = static_cast(position); -// -// auto writer_props = parquet::WriterProperties::Builder() -// .encryption(file_encryption_properties) -// ->build(); -// auto crypto_metadata = -// FileMetaDataBuilder::Make(metadata.schema(), writer_props)->GetCryptoMetaData(); -// WriteFileCryptoMetaData(*crypto_metadata, sink.get()); -// -// auto footer_encryptor = file_encryptor->GetFooterEncryptor(); -// WriteEncryptedFileMetadata(metadata, sink.get(), footer_encryptor, true); -// PARQUET_ASSIGN_OR_THROW(position, sink->Tell()); -// uint32_t footer_and_crypto_len = static_cast(position - metadata_start); -// PARQUET_THROW_NOT_OK( -// sink->Write(reinterpret_cast(&footer_and_crypto_len), 4)); -// PARQUET_THROW_NOT_OK(sink->Write(kParquetEMagic, 4)); -// } else { // Encrypted file with plaintext footer -// auto footer_signing_encryptor = file_encryptor->GetFooterSigningEncryptor(); -// WriteEncryptedFileMetadata(metadata, sink.get(), footer_signing_encryptor, false); -// } -//} - void WriteEncryptedMetadataFile( const FileMetaData& metadata, std::shared_ptr<::arrow::io::OutputStream> sink, std::shared_ptr file_encryption_properties) {