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

chore(rbo): MCOL-6143: Settle down rbo as a separate lib for Unittesting (#3708)

* fix builds

* MCOL-6143: rbo as a separate library

* Move get_unstable_optimizer out of rbo, move findStatisticsForATable to header bo be (dirty fix, but cuts the corner)

* Add some helpers to a headerfile for unittesting

* Simple unittests with some mocks
This commit is contained in:
Leonid Fedorov
2025-08-15 15:28:28 +04:00
committed by GitHub
parent 08d89fcef7
commit 14fe4401bc
15 changed files with 671 additions and 83 deletions

View File

@@ -156,24 +156,6 @@ void gp_walk_info::mergeTableStatistics(const TableStatisticsMap& aTableStatisti
}
}
std::optional<ColumnStatisticsMap> gp_walk_info::findStatisticsForATable(
SchemaAndTableName& schemaAndTableName)
{
auto tableStatisticsMapIt = tableStatisticsMap.find(schemaAndTableName);
for (auto& [schemaAndTableName, columnStatisticsMap] : tableStatisticsMap)
{
std::cout << "Table " << schemaAndTableName.schema << "." << schemaAndTableName.table
<< " has statistics " << columnStatisticsMap.size() << std::endl;
}
if (tableStatisticsMapIt == tableStatisticsMap.end())
{
return std::nullopt;
}
return {tableStatisticsMapIt->second};
}
} // namespace cal_impl_if
namespace