This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new a931affa17 GH-45073: [C++][Parquet] Fix generation of repetition 
levels for encryption test data (#45074)
a931affa17 is described below

commit a931affa1766be1f98979228ca6ab124aa7f793c
Author: Adam Reeve <[email protected]>
AuthorDate: Tue Jan 7 00:51:14 2025 +1300

    GH-45073: [C++][Parquet] Fix generation of repetition levels for encryption 
test data (#45074)
    
    ### Rationale for this change
    
    This makes the test data readable by other Parquet implementations that 
validate the repetition levels.
    
    ### What changes are included in this PR?
    
    * Corrects the generation of encryption test files so that the int64 list 
columns correctly start lists with repetition level 0.
    * Updates the parquet-testing submodule to use the corrected files.
    
    ### Are these changes tested?
    
    Yes, covered by existing tests.
    
    ### Are there any user-facing changes?
    
    No
    * GitHub Issue: #45073
    
    Authored-by: Adam Reeve <[email protected]>
    Signed-off-by: Antoine Pitrou <[email protected]>
---
 cpp/src/parquet/encryption/test_encryption_util.cc | 4 ++--
 cpp/submodules/parquet-testing                     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpp/src/parquet/encryption/test_encryption_util.cc 
b/cpp/src/parquet/encryption/test_encryption_util.cc
index 4fa215312f..cf863da60a 100644
--- a/cpp/src/parquet/encryption/test_encryption_util.cc
+++ b/cpp/src/parquet/encryption/test_encryption_util.cc
@@ -116,9 +116,9 @@ ColumnData<Int64Type> GenerateSampleData<Int64Type>(int 
rows) {
     int64_t value = i * 1000 * 1000;
     value *= 1000 * 1000;
     int16_t definition_level = 1;
-    int16_t repetition_level = 0;
+    int16_t repetition_level = 1;
     if ((i % 2) == 0) {
-      repetition_level = 1;  // start of a new record
+      repetition_level = 0;  // start of a new record
     }
     int64_col.values.push_back(value);
     int64_col.definition_levels.push_back(definition_level);
diff --git a/cpp/submodules/parquet-testing b/cpp/submodules/parquet-testing
index a7f1d288e6..c7cf1374cf 160000
--- a/cpp/submodules/parquet-testing
+++ b/cpp/submodules/parquet-testing
@@ -1 +1 @@
-Subproject commit a7f1d288e693dbb08e3199851c4eb2140ff8dff2
+Subproject commit c7cf1374cf284c0c73024cd1437becea75558bf8

Reply via email to