1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-30 07:25:34 +03:00

MCOL-6145: mcsgetplan() UDF for CSEP printing

This commit is contained in:
Leonid Fedorov
2025-08-18 18:24:30 +00:00
committed by drrtuy
parent 20dc485b92
commit 6ec363af70
10 changed files with 203 additions and 23 deletions

View File

@@ -102,10 +102,15 @@ bool Rule::apply(execplan::CalpontSelectExecutionPlan& root, optimizer::RBOptimi
{
changedThisRound = walk(root, ctx);
hasBeenApplied |= changedThisRound;
if (ctx.logRules && changedThisRound)
if (ctx.logRulesEnabled() && changedThisRound)
{
std::cout << "MCS RBO: " << name << " has been applied this round." << std::endl;
}
if (changedThisRound)
{
// Record rule application
ctx.addAppliedRule(name);
}
} while (changedThisRound && !applyOnlyOnce);
return hasBeenApplied;
@@ -149,7 +154,7 @@ bool Rule::walk(execplan::CalpontSelectExecutionPlan& csep, optimizer::RBOptimiz
if (mayApply(*current, ctx))
{
rewrite |= applyRule(*current, ctx);
++ctx.uniqueId;
ctx.incrementUniqueId();
}
}