You've already forked mariadb-columnstore-engine
							
							
				mirror of
				https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
				synced 2025-11-03 17:13:17 +03:00 
			
		
		
		
	feat(rbo,rules,QA): SC::setSimpleColumn does not have more than 1 SC in its SimpleColumn list.
This commit is contained in:
		@@ -1018,20 +1018,14 @@ execplan::SCSEP CalpontSelectExecutionPlan::cloneForTableWORecursiveSelects(
 | 
				
			|||||||
  for (const auto& rc : fReturnedCols)
 | 
					  for (const auto& rc : fReturnedCols)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    rc->setSimpleColumnList();
 | 
					    rc->setSimpleColumnList();
 | 
				
			||||||
    for (auto* simpleColumn : rc->simpleColumnList())
 | 
					    for (auto* sc : rc->simpleColumnList())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      // TODO check that is columnstore is correct
 | 
					      if (targetTableAlias.weakerEq(*sc->singleTable()))
 | 
				
			||||||
      // use RC::singleTable here
 | 
					 | 
				
			||||||
      execplan::CalpontSystemCatalog::TableAliasName rcTable(
 | 
					 | 
				
			||||||
          simpleColumn->schemaName(), simpleColumn->tableName(), simpleColumn->tableAlias(), "",
 | 
					 | 
				
			||||||
          simpleColumn->isColumnStore());
 | 
					 | 
				
			||||||
      if (!targetTableAlias.weakerEq(rcTable))
 | 
					 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        continue;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
        newReturnedCols.push_back(SRCP(rc->clone()));
 | 
					        newReturnedCols.push_back(SRCP(rc->clone()));
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  if (newReturnedCols.empty())
 | 
					  if (newReturnedCols.empty())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    std::cout << "cloneForTableWORecursiveSelects(): there are no Returned Columns after table filtering."
 | 
					    std::cout << "cloneForTableWORecursiveSelects(): there are no Returned Columns after table filtering."
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -748,9 +748,16 @@ void SimpleColumn::evaluate(Row& row, bool& isNull)
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void SimpleColumn::setSimpleColumnList()
 | 
					void SimpleColumn::setSimpleColumnList()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (fSimpleColumnList.empty())
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    fSimpleColumnList.push_back(this);
 | 
					    fSimpleColumnList.push_back(this);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    fSimpleColumnList.back() = this;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
std::optional<CalpontSystemCatalog::TableAliasName> sameTableCheck(std::vector<SimpleColumn*> simpleColumnList)
 | 
					std::optional<CalpontSystemCatalog::TableAliasName> sameTableCheck(std::vector<SimpleColumn*> simpleColumnList)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user