From a931affa1766be1f98979228ca6ab124aa7f793c Mon Sep 17 00:00:00 2001 From: Adam Reeve Date: Tue, 7 Jan 2025 00:51:14 +1300 Subject: [PATCH] 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 Signed-off-by: Antoine Pitrou --- 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 4fa215312f265..cf863da60a1d6 100644 --- a/cpp/src/parquet/encryption/test_encryption_util.cc +++ b/cpp/src/parquet/encryption/test_encryption_util.cc @@ -116,9 +116,9 @@ ColumnData GenerateSampleData(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 a7f1d288e693d..c7cf1374cf284 160000 --- a/cpp/submodules/parquet-testing +++ b/cpp/submodules/parquet-testing @@ -1 +1 @@ -Subproject commit a7f1d288e693dbb08e3199851c4eb2140ff8dff2 +Subproject commit c7cf1374cf284c0c73024cd1437becea75558bf8