| 15 | namespace DB::Statistics |
| 16 | { |
| 17 | void dropStatsTable(ContextPtr context, const StatsTableIdentifier & table, StatisticsCachePolicy cache_policy, bool throw_exception) |
| 18 | { |
| 19 | try |
| 20 | { |
| 21 | auto catalog = createCatalogAdaptor(context); |
| 22 | catalog->checkHealth(/*is_write=*/true); |
| 23 | auto proxy = createCachedStatsProxy(catalog, cache_policy); |
| 24 | |
| 25 | proxy->drop(table); |
| 26 | catalog->invalidateClusterStatsCache(table); |
| 27 | } |
| 28 | catch (...) |
| 29 | { |
| 30 | if (throw_exception) |
| 31 | throw; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void dropStatsColumns( |
| 36 | ContextPtr context, |
no test coverage detected