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

   ### PR Description
   
   **Which issue does this PR close?**
   
   * Part of #22772
   
   ### Rationale for this change
   
   `SharedBuildAccumulator::build_filter` contains non-trivial logic for 
assembling dynamic-filter expressions during finalize. A follow-up refactor 
will extract this logic, so this change adds focused regression tests that 
document and lock in the current expression-construction policy. These tests 
help ensure the refactor preserves existing pruning semantics without changing 
production behavior. 
   
   ### What changes are included in this PR?
   
   * Add reusable test helpers for constructing `SharedBuildAccumulator` 
instances and inspecting generated dynamic-filter expressions.
   * Add `CollectLeft` regression tests covering:
   
     * membership-only filters
     * bounds-only filters
     * combined membership and bounds filters
     * empty input that should not update the dynamic filter
   * Add `Partitioned` regression tests covering:
   
     * a single non-empty partition without unnecessary `CASE` wrapping
     * multiple non-empty partitions using hash routing with `CASE`
     * all-empty partitions producing a rejecting filter
     * canceled/unknown partitions preserving a permissive fallback for unknown 
routes
   * Keep assertions focused on expression structure and policy rather than 
accumulator synchronization details. 
   
   ### Are these changes tested?
   
   Yes.
   
   This PR adds the following unit tests:
   
   * `collect_left_updates_with_membership_only`
   * `collect_left_updates_with_bounds_only`
   * `collect_left_combines_membership_and_bounds`
   * `collect_left_empty_build_data_does_not_update_filter`
   * `partitioned_one_real_partition_with_rest_empty_skips_case`
   * `partitioned_multiple_real_partitions_uses_case_with_false_fallback`
   * `partitioned_all_empty_partitions_updates_filter_to_false`
   * `partitioned_canceled_unknown_partitions_keep_unknown_routes_permissive`
   
   Verification:
   
   ```bash
   cargo test -p datafusion-physical-plan shared_bounds
   ```
   
   ### Are there any user-facing changes?
   
   No. This PR adds regression test coverage only and does not change 
production behavior.
   
   ### LLM-generated code disclosure
   
   This PR includes LLM-generated code and comments. All LLM-generated content 
has been manually reviewed.


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