| 60 | } |
| 61 | |
| 62 | static void appendIndexStats(PlannerTableStats& plannerStats, const Catalog& catalog, |
| 63 | const Transaction* transaction, const TableCatalogEntry& tableEntry, table_id_t tableID) { |
| 64 | for (const auto indexEntry : catalog.getIndexEntries(transaction, tableID)) { |
| 65 | auto indexStats = PlannerIndexStats{}; |
| 66 | indexStats.indexType = indexEntry->getIndexType(); |
| 67 | indexStats.isPrimary = indexEntry->getIndexName() == InternalKeyword::ID; |
| 68 | for (const auto propertyID : indexEntry->getPropertyIDs()) { |
| 69 | indexStats.columnIDs.push_back(tableEntry.getColumnID(propertyID)); |
| 70 | } |
| 71 | plannerStats.indexStats.push_back(std::move(indexStats)); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | PlannerTableStats buildPlannerTableStats(StorageManager& storageManager, const Catalog& catalog, |
| 76 | const Transaction* transaction, const TableCatalogEntry& tableEntry, table_id_t physicalTableID, |
no test coverage detected