You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-11-03 17:13:17 +03:00
chore(rbo,rules): fixed lost flag value result back propagation to resolve RBO logging and added recursive passes for projection list optimization.
This commit is contained in:
@@ -188,6 +188,12 @@ void derivedTableOptimization(gp_walk_info* gwip, SCSEP& csep)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// recursively process the nested derived table
|
||||||
|
for (uint i = 0; i < csep->subSelectList().size(); i++)
|
||||||
|
{
|
||||||
|
SCSEP subselect(boost::dynamic_pointer_cast<CalpontSelectExecutionPlan>(csep->subSelectList()[i]));
|
||||||
|
derivedTableOptimization(gwip, subselect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FromSubQuery::FromSubQuery(gp_walk_info& gwip) : SubQuery(gwip)
|
FromSubQuery::FromSubQuery(gp_walk_info& gwip) : SubQuery(gwip)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ bool Rule::apply(execplan::CalpontSelectExecutionPlan& root, optimizer::RBOptimi
|
|||||||
{
|
{
|
||||||
changedThisRound = walk(root, ctx);
|
changedThisRound = walk(root, ctx);
|
||||||
hasBeenApplied |= changedThisRound;
|
hasBeenApplied |= changedThisRound;
|
||||||
if (ctx.logRules)
|
if (ctx.logRules && changedThisRound)
|
||||||
{
|
{
|
||||||
std::cout << "MCS RBO: " << name << " has been applied this round." << std::endl;
|
std::cout << "MCS RBO: " << name << " has been applied this round." << std::endl;
|
||||||
}
|
}
|
||||||
@@ -132,7 +132,7 @@ bool Rule::walk(execplan::CalpontSelectExecutionPlan& csep, optimizer::RBOptimiz
|
|||||||
|
|
||||||
if (mayApply(*current))
|
if (mayApply(*current))
|
||||||
{
|
{
|
||||||
rewrite = applyRule(*current, ctx);
|
rewrite |= applyRule(*current, ctx);
|
||||||
++ctx.uniqueId;
|
++ctx.uniqueId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user