You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-10-31 18:30:33 +03:00
Reapply "fix(joblist,QA): introduced extended SC ptrs collector to resolve the issue when ParseTree consist of ArithmCol-AggCol does not return SCs from AggCol."
This reverts commit f807ebcdfd.
This commit is contained in:
@@ -83,6 +83,18 @@ void getAggCols(execplan::ParseTree* n, void* obj)
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<SimpleColumn*>& getSCsFromRCForExtended(const SRCP& srcp)
|
||||
{
|
||||
srcp->setSimpleColumnListExtended();
|
||||
return srcp->simpleColumnListExtended();
|
||||
}
|
||||
|
||||
const std::vector<SimpleColumn*>& getSCsFromRC(const SRCP& srcp)
|
||||
{
|
||||
srcp->setSimpleColumnList();
|
||||
return srcp->simpleColumnList();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructors/Destructors
|
||||
*/
|
||||
@@ -129,18 +141,36 @@ AggregateColumn::AggregateColumn(const AggregateColumn& rhs, const uint32_t sess
|
||||
void AggregateColumn::setSimpleColumnList()
|
||||
{
|
||||
fSimpleColumnList.clear();
|
||||
return setSimpleColumnList_(false);
|
||||
}
|
||||
|
||||
void AggregateColumn::setSimpleColumnListExtended()
|
||||
{
|
||||
fSimpleColumnListExtended.clear();
|
||||
return setSimpleColumnList_(true);
|
||||
}
|
||||
|
||||
void AggregateColumn::setSimpleColumnList_(const bool extractSCsfromAggCol)
|
||||
{
|
||||
for (const auto& parm : aggParms())
|
||||
{
|
||||
if (!parm)
|
||||
continue;
|
||||
|
||||
parm->setSimpleColumnList();
|
||||
for (auto* sc : parm->simpleColumnList())
|
||||
|
||||
auto aggParmsAsSCVec = (extractSCsfromAggCol) ? getSCsFromRCForExtended(parm) : getSCsFromRC(parm);
|
||||
|
||||
for (auto* sc : aggParmsAsSCVec)
|
||||
{
|
||||
if (sc)
|
||||
{
|
||||
fSimpleColumnList.push_back(sc);
|
||||
if (extractSCsfromAggCol)
|
||||
{
|
||||
fSimpleColumnListExtended.push_back(sc);
|
||||
}
|
||||
else
|
||||
{
|
||||
fSimpleColumnList.push_back(sc);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user