Extract dynamic filter expression composition from SharedBuildAccumulator::build_filter#23370
Extract dynamic filter expression composition from SharedBuildAccumulator::build_filter#23370kosiew wants to merge 4 commits into
SharedBuildAccumulator::build_filter#23370Conversation
- Added private components: - DynamicFilterExprComposer - FilterComposition variants (NoUpdate, Update) - Moved CollectLeft and Partitioned expression policies into the composer. - Updated SharedBuildAccumulator::build_filter to be a thin delegate with dynamic_filter.update integration.
…bounds - Built lazy routing modulo expr only when CASE is needed. - Deduplicated CaseExpr construction using partition_case. - Extracted reported-partition branch assembly into compose_reported_partition_branch. - Removed trivial private constructor; utilized struct literal instead.
|
run benchmark hj |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing dynamic-filter-02-22772 (63cb7b6) to d09a52a (merge-base) diff using: hj File an issue against this benchmark runner |
|
run benchmark sql env:
BENCH_NAME: hj |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing dynamic-filter-02-22772 (63cb7b6) to d09a52a (merge-base) diff using: sql File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: CPU Details (lscpu)Details
Resource Usagehj — base (merge-base)
hj — branch
File an issue against this benchmark runner |
Which issue does this PR close?
Rationale for this change
SharedBuildAccumulator::build_filtercurrently combines lifecycle coordination with dynamic-filter expression construction for both collect-left and partitioned execution paths. This interleaves synchronization logic with expression composition, making the expression policy harder to evolve independently.This change extracts the expression assembly into a dedicated private helper so that the accumulator remains responsible for coordinating finalization and applying dynamic filter updates, while the helper owns expression construction and fallback policy. The refactoring is intended to preserve existing dynamic-filter semantics.
What changes are included in this PR?
DynamicFilterExprComposerresponsible for finalize-time dynamic-filter expression composition.FilterCompositionto distinguish between updating the dynamic filter and intentionally performing no update.CASEexpression generation, into the composer.SharedBuildAccumulator::build_filterso it delegates expression construction to the composer and only applies updates when required.Are these changes tested?
No tests are included in this PR.
This change is a refactoring intended to preserve existing behavior. Existing tests covering hash-join dynamic filtering are expected to continue to pass unchanged.
Are there any user-facing changes?
No.
LLM-generated code disclosure
This PR includes LLM-generated code and comments. All LLM-generated content has been manually reviewed.