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

Method tryResolveStorageID

src/Interpreters/Context.cpp:4651–4668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4649}
4650
4651StorageID Context::tryResolveStorageID(StorageID storage_id, StorageNamespace where) const
4652{
4653 if (storage_id.uuid != UUIDHelpers::Nil)
4654 return storage_id;
4655
4656 StorageID resolved = StorageID::createEmpty();
4657 {
4658 auto lock = getLock(); // checked
4659 resolved = resolveStorageIDImpl(std::move(storage_id), where, nullptr);
4660 }
4661 if (resolved && !resolved.hasUUID() && resolved.database_name != DatabaseCatalog::TEMPORARY_DATABASE)
4662 {
4663 auto db = DatabaseCatalog::instance().tryGetDatabase(resolved.database_name, shared_from_this());
4664 if (db)
4665 resolved.uuid = db->tryGetTableUUID(resolved.table_name);
4666 }
4667 return resolved;
4668}
4669
4670// TODO(renming)
4671// table -> first check in temporary table, then resolve as current_catalog.current_database.table

Callers 15

createExternalTablesMethod · 0.80
receiveDataMethod · 0.80
aeolusCheckFunction · 0.80
checkDatabaseAndTableFunction · 0.80
addTableFromASTMethod · 0.80
assertOrSetUUIDMethod · 0.80
doCreateTableMethod · 0.80
processTaskMethod · 0.80
executeImplMethod · 0.80
executeToTableImplMethod · 0.80

Calls 4

getLockFunction · 0.85
hasUUIDMethod · 0.80
tryGetDatabaseMethod · 0.80
tryGetTableUUIDMethod · 0.45

Tested by

no test coverage detected