MCPcopy Create free account
hub / github.com/ByConity/ByConity / dropStatsTable

Function dropStatsTable

src/Statistics/DropHelper.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace DB::Statistics
16{
17void 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
35void dropStatsColumns(
36 ContextPtr context,

Callers 1

executeMethod · 0.85

Calls 5

createCatalogAdaptorFunction · 0.85
createCachedStatsProxyFunction · 0.85
checkHealthMethod · 0.80
dropMethod · 0.45

Tested by

no test coverage detected