1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-10-31 18:30:33 +03:00

fix(QA,joblist): SimpleFilter::setSimpleColumnListExtended() now populates the correct SimpleColumn list.

This commit is contained in:
drrtuy
2025-09-10 17:43:18 +00:00
parent 0d609ec485
commit 2506d3fe1e
4 changed files with 12 additions and 31 deletions

View File

@@ -138,39 +138,26 @@ AggregateColumn::AggregateColumn(const AggregateColumn& rhs, const uint32_t sess
* Methods * Methods
*/ */
void AggregateColumn::setSimpleColumnList()
{
fSimpleColumnList.clear();
return setSimpleColumnList_(false);
}
void AggregateColumn::setSimpleColumnListExtended() void AggregateColumn::setSimpleColumnListExtended()
{ {
fSimpleColumnListExtended.clear(); fSimpleColumnListExtended.clear();
return setSimpleColumnList_(true); return setSimpleColumnListExtended_();
} }
void AggregateColumn::setSimpleColumnList_(const bool extractSCsfromAggCol) void AggregateColumn::setSimpleColumnListExtended_()
{ {
for (const auto& parm : aggParms()) for (const auto& parm : aggParms())
{ {
if (!parm) if (!parm)
continue; continue;
auto aggParmsAsSCVec = (extractSCsfromAggCol) ? getSCsFromRCForExtended(parm) : getSCsFromRC(parm); auto aggParmsAsSCVec = getSCsFromRCForExtended(parm);
for (auto* sc : aggParmsAsSCVec) for (auto* sc : aggParmsAsSCVec)
{ {
if (sc) if (sc)
{ {
if (extractSCsfromAggCol) fSimpleColumnListExtended.push_back(sc);
{
fSimpleColumnListExtended.push_back(sc);
}
else
{
fSimpleColumnList.push_back(sc);
}
} }
} }
} }

View File

@@ -161,9 +161,8 @@ class AggregateColumn : public ReturnedColumn
fAggParms = parms; fAggParms = parms;
} }
void setSimpleColumnList_(const bool extractSCsfromAggCol);
void setSimpleColumnList() override;
void setSimpleColumnListExtended() override; void setSimpleColumnListExtended() override;
void setSimpleColumnListExtended_();
/** return a copy of this pointer /** return a copy of this pointer
* *

View File

@@ -857,19 +857,21 @@ void SimpleFilter::setSimpleColumnListExtended()
else if (fLhs) else if (fLhs)
{ {
fLhs->setSimpleColumnListExtended(); fLhs->setSimpleColumnListExtended();
fSimpleColumnList.insert(fSimpleColumnList.end(), fLhs->simpleColumnListExtended().begin(), fSimpleColumnListExtended.insert(fSimpleColumnListExtended.end(),
fLhs->simpleColumnListExtended().end()); fLhs->simpleColumnListExtended().begin(),
fLhs->simpleColumnListExtended().end());
} }
if (rsc) if (rsc)
{ {
fSimpleColumnList.push_back(rsc); fSimpleColumnListExtended.push_back(rsc);
} }
else if (fRhs) else if (fRhs)
{ {
fRhs->setSimpleColumnListExtended(); fRhs->setSimpleColumnListExtended();
fSimpleColumnList.insert(fSimpleColumnList.end(), fRhs->simpleColumnListExtended().begin(), fSimpleColumnListExtended.insert(fSimpleColumnListExtended.end(),
fRhs->simpleColumnListExtended().end()); fRhs->simpleColumnListExtended().begin(),
fRhs->simpleColumnListExtended().end());
} }
} }

View File

@@ -544,13 +544,6 @@ void updateSCsUsingWalkers(optimizer::TableAliasToNewAliasAndSCPositionsMap& tab
{ {
tryToUpdateScToUseRewrittenDerived(sc, tableAliasToSCPositionsMap); tryToUpdateScToUseRewrittenDerived(sc, tableAliasToSCPositionsMap);
} }
std::vector<execplan::SimpleColumn*> simpleColumnsFromAgg;
pt->walk(execplan::getAggCols, &simpleColumnsFromAgg);
for (auto* sc : simpleColumnsFromAgg)
{
tryToUpdateScToUseRewrittenDerived(sc, tableAliasToSCPositionsMap);
}
} }
// This routine takes tableAliasToSCPositionsMap and extraSCs and correlate extraSCs with positions. // This routine takes tableAliasToSCPositionsMap and extraSCs and correlate extraSCs with positions.