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

View File

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

View File

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

View File

@@ -544,13 +544,6 @@ void updateSCsUsingWalkers(optimizer::TableAliasToNewAliasAndSCPositionsMap& tab
{
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.