1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-11-03 17:13:17 +03:00

chore(rbo): MCOL-6143: Settle down rbo as a separate lib for Unittesting (#3708)

* fix builds

* MCOL-6143: rbo as a separate library

* Move get_unstable_optimizer out of rbo, move findStatisticsForATable to header bo be (dirty fix, but cuts the corner)

* Add some helpers to a headerfile for unittesting

* Simple unittests with some mocks
This commit is contained in:
Leonid Fedorov
2025-08-15 15:28:28 +04:00
committed by GitHub
parent 08d89fcef7
commit 14fe4401bc
15 changed files with 671 additions and 83 deletions

View File

@@ -49,11 +49,11 @@ bool optimizeCSEPWithRules(execplan::CalpontSelectExecutionPlan& root, const std
}
// high level API call for optimizer
bool optimizeCSEP(execplan::CalpontSelectExecutionPlan& root, optimizer::RBOptimizerContext& ctx)
bool optimizeCSEP(execplan::CalpontSelectExecutionPlan& root, optimizer::RBOptimizerContext& ctx,
bool useUnstableOptimizer)
{
std::vector<optimizer::Rule> rules;
if (get_unstable_optimizer(&ctx.thd))
if (useUnstableOptimizer)
{
optimizer::Rule parallelCES{"parallel_ces", optimizer::parallelCESFilter, optimizer::applyParallelCES};
rules.push_back(parallelCES);