1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

chore(): review fixes

This commit is contained in:
drrtuy
2025-06-24 11:47:53 +00:00
parent 3bf4394456
commit 8a2ae35918
2 changed files with 4 additions and 48 deletions

View File

@@ -863,6 +863,7 @@ void CalpontSelectExecutionPlan::pron(std::string&& pron)
fPron = pron;
}
// This routine doesn't copy derived table list, union vector, select subqueries, subquery list, and subselects.
execplan::SCSEP CalpontSelectExecutionPlan::cloneWORecursiveSelects()
{
execplan::SCSEP newPlan(new CalpontSelectExecutionPlan(fLocation));
@@ -925,15 +926,6 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneWORecursiveSelects()
newPlan->filterTokenList(fFilterTokenList);
newPlan->havingTokenList(fHavingTokenList);
// Deep copy of subselects
// SelectList newSubSelects;
// for (const auto& sel : fSubSelects)
// {
// if (sel)
// newSubSelects.push_back(SCEP(sel->clone()));
// }
// newPlan->subSelects(newSubSelects);
// Deep copy of group by columns
GroupByColumnList newGroupByCols;
for (const auto& col : fGroupByCols)
@@ -971,42 +963,6 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneWORecursiveSelects()
// Deep copy of table list
newPlan->tableList(fTableList);
// // Deep copy of derived table list
// SelectList newDerivedTableList;
// for (const auto& sel : fDerivedTableList)
// {
// if (sel)
// newDerivedTableList.push_back(SCEP(sel->clone()));
// }
// newPlan->derivedTableList(newDerivedTableList);
// // Deep copy of union vector
// SelectList newUnionVec;
// for (const auto& sel : fUnionVec)
// {
// if (sel)
// newUnionVec.push_back(SCEP(sel->clone()));
// }
// newPlan->unionVec(newUnionVec);
// // Deep copy of select subqueries
// SelectList newSelectSubList;
// for (const auto& sel : fSelectSubList)
// {
// if (sel)
// newSelectSubList.push_back(SCEP(sel->clone()));
// }
// newPlan->selectSubList(newSelectSubList);
// // Deep copy of subquery list
// std::vector<SCSEP> newSubSelectList;
// for (const auto& sel : fSubSelectList)
// {
// if (sel)
// newSubSelectList.push_back(SCSEP(sel->clone()));
// }
// newPlan->subSelectList(newSubSelectList);
return newPlan;
}

View File

@@ -51,9 +51,9 @@ bool Rule::apply(execplan::CalpontSelectExecutionPlan& root) const
bool hasBeenApplied = false;
do
{
changedThisRound = walk(root) && !applyOnlyOnce;
hasBeenApplied = changedThisRound;
} while (changedThisRound);
changedThisRound = walk(root);
hasBeenApplied |= changedThisRound;
} while (changedThisRound && !applyOnlyOnce);
return hasBeenApplied;
}