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
feat(rbo,rules,QA): filtered RC clone for UNION units.
This commit is contained in:
@@ -1017,11 +1017,13 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneForTableWORecursiveSelects(
|
||||
ReturnedColumnList newReturnedCols;
|
||||
for (const auto& rc : fReturnedCols)
|
||||
{
|
||||
auto* simpleColumn = dynamic_cast<execplan::SimpleColumn*>(rc.get());
|
||||
if (simpleColumn)
|
||||
rc->setSimpleColumnList();
|
||||
for (auto* simpleColumn : rc->simpleColumnList())
|
||||
{
|
||||
// TODO check that is columnstore is correct
|
||||
execplan::CalpontSystemCatalog::TableAliasName rcTable(
|
||||
simpleColumn->schemaName(), simpleColumn->tableName(), simpleColumn->tableAlias(), "", false);
|
||||
simpleColumn->schemaName(), simpleColumn->tableName(), simpleColumn->tableAlias(), "",
|
||||
simpleColumn->isColumnStore());
|
||||
if (!targetTableAlias.weakerEq(rcTable))
|
||||
{
|
||||
continue;
|
||||
@@ -1029,6 +1031,11 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneForTableWORecursiveSelects(
|
||||
newReturnedCols.push_back(SRCP(rc->clone()));
|
||||
}
|
||||
}
|
||||
if (newReturnedCols.empty())
|
||||
{
|
||||
std::cout << "cloneForTableWORecursiveSelects(): there are no Returned Columns after table filtering."
|
||||
<< std::endl;
|
||||
}
|
||||
newPlan->returnedCols(newReturnedCols);
|
||||
|
||||
// Deep copy of filters
|
||||
@@ -1059,7 +1066,7 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneForTableWORecursiveSelects(
|
||||
OrderByColumnList newOrderByCols;
|
||||
for (const auto& col : fOrderByCols)
|
||||
{
|
||||
newOrderByCols.push_back(SRCP(col->clone()));
|
||||
newOrderByCols.push_back(SRCP(col->clone()));
|
||||
}
|
||||
newPlan->orderByCols(newOrderByCols);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user