tolleybot commented on code in PR #39623:
URL: https://github.com/apache/arrow/pull/39623#discussion_r1504130861


##########
cpp/src/arrow/dataset/large_row_parquet_encrypt_test.cc:
##########
@@ -0,0 +1,201 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include <arrow/api.h>
+#include <arrow/dataset/dataset.h>
+#include <arrow/dataset/file_base.h>
+#include <arrow/dataset/file_parquet.h>
+#include <arrow/dataset/parquet_encryption_config.h>
+#include <arrow/filesystem/localfs.h>  // Include the header for 
LocalFileSystem
+#include <arrow/filesystem/mockfs.h>
+#include <arrow/io/api.h>
+#include <arrow/status.h>
+#include <arrow/table.h>
+#include <arrow/testing/gtest_util.h>
+#include <arrow/testing/random.h>
+#include <parquet/arrow/reader.h>
+#include <parquet/encryption/crypto_factory.h>
+#include <parquet/encryption/encryption.h>
+#include <parquet/encryption/encryption_internal.h>
+#include <parquet/encryption/kms_client.h>
+#include <parquet/encryption/test_in_memory_kms.h>
+#include <cmath>
+#include <memory>
+#include <string_view>
+#include "gtest/gtest.h"
+
+#include <arrow/util/base64.h>
+#include <filesystem>
+
+constexpr int ROW_COUNT = 32769;
+
+constexpr std::string_view kFooterKeyName = "footer_key";
+constexpr std::string_view kColumnKeyMapping = "col_key: foo";
+constexpr std::string_view kBaseDir = "/Users/dtolley/Documents/temp";
+
+using arrow::internal::checked_pointer_cast;
+
+namespace arrow {
+namespace dataset {
+
+class NoOpKmsClient : public parquet::encryption::KmsClient {
+ public:
+  NoOpKmsClient() {}
+
+  std::string WrapKey(const std::string& key_bytes,
+                      const std::string& master_key_identifier) override {
+    // Base64 encode the key
+    return arrow::util::base64_encode(std::string_view(key_bytes));
+  }
+
+  std::string UnwrapKey(const std::string& wrapped_key,
+                        const std::string& master_key_identifier) override {
+    // Base64 decode the key
+    return arrow::util::base64_decode(std::string_view(wrapped_key));
+  }
+};
+
+class NoOpKmsClientFactory : public parquet::encryption::KmsClientFactory {
+ public:
+  NoOpKmsClientFactory() {}
+
+  std::shared_ptr<parquet::encryption::KmsClient> CreateKmsClient(
+      const parquet::encryption::KmsConnectionConfig& config) override {
+    // Return a new instance of NoOpKmsClient
+    return std::make_shared<NoOpKmsClient>();
+  }
+};
+
+class LargeRowEncryptionTest : public ::testing::Test {

Review Comment:
   Understood I'll keep working on it until it fails



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