You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/07/31 21:12:56 UTC

(datafusion) 01/01: test: Fix data_pagesize_limit extraction in parquet writer props roundtrip test (#23664)

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

github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/main/pr-23664-2eaba476e7678325c1d61becabee91d1b1020b22
in repository https://gitbox.apache.org/repos/asf/datafusion.git

commit 285559e44f4ddd6303e3d6e5c873f9e1075fdada
Author: jackylee <qc...@gmail.com>
AuthorDate: Sat Aug 1 05:12:44 2026 +0800

    test: Fix data_pagesize_limit extraction in parquet writer props roundtrip test (#23664)
    
    ## Which issue does this PR close?
    
    N/A
    
    ## Rationale for this change
    
    In the test helper `session_config_from_writer_props`,
    `data_pagesize_limit` is extracted from
    `props.dictionary_page_size_limit()` instead of
    `props.data_page_size_limit()`. The bug is masked because
    `parquet_options_with_non_defaults` sets both limits to the same value
    (42), so the roundtrip test cannot catch a mixed-up mapping between
    these two options.
    
    ## What changes are included in this PR?
    
    - Extract `data_pagesize_limit` from `props.data_page_size_limit()`.
    - Use distinct values for `data_pagesize_limit` (42) and
    `dictionary_page_size_limit` (43) in the test options so the roundtrip
    test can detect such mix-ups.
    
    ## Are these changes tested?
    
    Yes, covered by the existing `table_parquet_opts_to_writer_props`
    roundtrip test. Verified that reverting the extraction fix now makes the
    test fail.
    
    ## Are there any user-facing changes?
    
    No, test-only change.
---
 datafusion/common/src/file_options/parquet_writer.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/datafusion/common/src/file_options/parquet_writer.rs b/datafusion/common/src/file_options/parquet_writer.rs
index 320bfcf33e..20696135e9 100644
--- a/datafusion/common/src/file_options/parquet_writer.rs
+++ b/datafusion/common/src/file_options/parquet_writer.rs
@@ -473,7 +473,7 @@ mod tests {
             writer_version,
             compression: Some("zstd(22)".into()),
             dictionary_enabled: Some(!defaults.dictionary_enabled.unwrap_or(false)),
-            dictionary_page_size_limit: 42,
+            dictionary_page_size_limit: 43,
             statistics_enabled: Some("chunk".into()),
             max_row_group_size: 42,
             max_row_group_bytes: Some(MaxRowGroupBytes::try_new(42).unwrap()),
@@ -579,7 +579,7 @@ mod tests {
         TableParquetOptions {
             global: ParquetOptions {
                 // global options
-                data_pagesize_limit: props.dictionary_page_size_limit(),
+                data_pagesize_limit: props.data_page_size_limit(),
                 write_batch_size: props.write_batch_size(),
                 writer_version: props.writer_version().into(),
                 dictionary_page_size_limit: props.dictionary_page_size_limit(),


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org