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

Method execute

src/Interpreters/InterpreterDropQuery.cpp:74–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72
73
74BlockIO InterpreterDropQuery::execute()
75{
76 auto & drop = query_ptr->as<ASTDropQuery &>();
77 if (!drop.cluster.empty())
78 return executeDDLQueryOnCluster(query_ptr, getContext(), getRequiredAccessForDDLOnCluster());
79
80 if (getContext()->getSettingsRef().database_atomic_wait_for_drop_and_detach_synchronously)
81 drop.no_delay = true;
82 if (drop.table.empty() && drop.database.empty() && !drop.catalog.empty())
83 return executeToCatalog(drop);
84 else if (drop.is_snapshot)
85 return executeToSnapshot(drop);
86 else if (!drop.table.empty())
87 return executeToTable(drop);
88 else if (!drop.database.empty())
89 return executeToDatabase(drop);
90 else
91 throw Exception("Nothing to drop, both names are empty", ErrorCodes::LOGICAL_ERROR);
92}
93
94
95void InterpreterDropQuery::waitForTableToBeActuallyDroppedOrDetached(const ASTDropQuery & query, const DatabasePtr & db, const UUID & uuid_to_wait)

Callers 1

executeDropQueryMethod · 0.45

Calls 3

executeDDLQueryOnClusterFunction · 0.85
ExceptionClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected