MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / execute

Method execute

src/Interpreters/InterpreterUndropQuery.cpp:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30BlockIO InterpreterUndropQuery::execute()
31{
32 getContext()->checkAccess(AccessType::UNDROP_TABLE);
33
34 auto & undrop = query_ptr->as<ASTUndropQuery &>();
35 if (!undrop.cluster.empty() && !maybeRemoveOnCluster(query_ptr, getContext()))
36 {
37 DDLQueryOnClusterParams params;
38 params.access_to_check = getRequiredAccessForDDLOnCluster();
39 return executeDDLQueryOnCluster(query_ptr, getContext(), params);
40 }
41
42 if (undrop.table)
43 return executeToTable(undrop);
44 throw Exception(ErrorCodes::LOGICAL_ERROR, "Nothing to undrop, both names are empty");
45}
46
47BlockIO InterpreterUndropQuery::executeToTable(ASTUndropQuery & query)
48{

Callers

nothing calls this directly

Calls 6

maybeRemoveOnClusterFunction · 0.85
executeDDLQueryOnClusterFunction · 0.85
ExceptionClass · 0.70
getContextFunction · 0.50
checkAccessMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected