Repository navigation
Restructure the Cascades optimizer code following the review of #86353 - #115293
Conversation
…ontext` to the per-query settings The engine members and methods (memo, rules, task stack, costing) move from `OptimizerContext` into `CascadesOptimizer`, and the former `OptimizationEnvironment` fields become the new `OptimizerContext`. Co-Authored-By: Claude Fable 5 <[email protected]>
…zerDefaults`; strategies become per-type singletons compared by pointer; rename `EnforcerAxis` to `EnforcedProperty` Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
…he passthrough, extract `inputAtSourceDistribution` Co-Authored-By: Claude Fable 5 <[email protected]>
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [f451906] Summary: ✅
AI ReviewSummaryThis PR is a large internal refactor of the Missing context / blind spots
Final Verdict✅ No blocking findings in the current revision. LLVM Coverage Report
Changed lines: Changed C/C++ lines covered: 603/659 (91.50%) · Uncovered code |
… after the `TwoStageTopN` split Co-Authored-By: Claude Fable 5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction. Object file sizes20 object files changed (+327.12 KiB total), 4 added.
738 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units30 translation units recompiled, 175 s compile time in total, 26 of them have a recent master baseline. Median compile-time ratio to the baselines is ×1.20 (machine-speed difference or a change affecting every TU); per-TU deltas below are relative to that ratio. Translation units without a recent master baseline:
|
…instead of reusing the memo Co-Authored-By: Claude Fable 5 <[email protected]>
Related: #86353
Restructures the Cascades optimizer code to address the review comments on #86353. No behavior changes: every plan-shape reference is byte-identical, and the Cascades gtests and the distributed-plan test suite pass unchanged.
CascadesOptimizernow owns the search engine: the memo, the rule registries, the task stack, costing, and plan extraction. The formerOptimizationEnvironmentfields become the newOptimizerContext, a plain per-query settings struct stored in the memo.LocalRead,ParallelRead,ReplicatedRead,TopN, andTwoStageTopNeach moved into their own source file. The helpers shared by the rules moved toRuleUtils, and the fixed model constants (task budget, fallback selectivities, row-width defaults) moved toOptimizerDefaults.h. The per-operator cost constants stay inCostConfigbecause a query can override them.strategySingleton<T>), and expressions compare them by pointer instead of by name.EnforcerAxisis renamed toEnforcedProperty.std::unique_ptrinstead ofstd::shared_ptr.gtest_cascades_group_dedup.Group::selectInputImplementationis inlined into the selection lambda,DistributionPassthroughrejects an impossible variant before it copies theGroupExpression, and the repeated input-requirement construction inDistributionEnforceris extracted intoinputAtSourceDistribution.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/115293]