pitrou commented on code in PR #36972:
URL: https://github.com/apache/arrow/pull/36972#discussion_r1290338255


##########
cpp/src/parquet/encoding_test.cc:
##########
@@ -641,27 +642,38 @@ class EncodingAdHocTyped : public ::testing::Test {
 
   static std::shared_ptr<::arrow::DataType> arrow_type();
 
-  void Plain(int seed) {
-    auto values = GetValues(seed);
+  void Plain(int seed, int round = 1) {
+    auto random_array = GetValues(seed);
     auto encoder = MakeTypedEncoder<ParquetType>(
         Encoding::PLAIN, /*use_dictionary=*/false, column_descr());
     auto decoder = MakeTypedDecoder<ParquetType>(Encoding::PLAIN, 
column_descr());
 
-    ASSERT_NO_THROW(encoder->Put(*values));
+    for (int i = 0; i < round; ++i) {
+      ASSERT_NO_THROW(encoder->Put(*random_array));
+    }
+    std::shared_ptr<::arrow::Array> values;
+    if (round == 1) {
+      values = random_array;
+    } else {
+      ::arrow::ArrayVector arrays;
+      arrays.resize(round, random_array);

Review Comment:
   Small simplification:
   ```suggestion
         ::arrow::ArrayVector arrays(round, random_array);
   ```



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

Reply via email to