ShashidharM0118 opened a new pull request, #19405:
URL: https://github.com/apache/datafusion/pull/19405

   ## Which issue does this PR close?
   
   Closes #19333
   
   ## Rationale for this change
   
   The test suite for `ParquetOpener` exhibited substantial code duplication 
across multiple test functions. Each test was constructing `ParquetOpener` 
instances with largely identical field values, resulting in verbose and 
repetitive code that hindered maintainability and obscured the distinguishing 
characteristics of each test case.
   
   
   ## What changes are included in this PR?
   
   - Added `ParquetOpenerBuilder` struct in the test module (`#[cfg(test)]`) 
with sensible defaults matching the original test code patterns
   - Refactored 8 test functions to use the builder pattern:
     - `test_prune_on_statistics`
     - `test_prune_on_partition_statistics_with_dynamic_expression`
     - `test_prune_on_partition_values_and_file_statistics`
     - `test_prune_on_partition_value_and_data_value`
     - `test_opener_pruning_skipped_on_static_filters`
     - `test_reverse_scan_row_groups`
     - `test_reverse_scan_single_row_group`
     - `test_reverse_scan_with_row_selection`
   - Reduced code from ~28 lines per test to ~6-8 lines, highlighting only the 
fields that differ
   
   ## Are these changes tested?
   Yes
   
   ## Are there any user-facing changes?
   No


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to