presto-main/src/main/java/io/prestosql/metadata/MetadataUtil.java/MetadataUtil/createCatalogName
class MetadataUtil:    public static String createCatalogName(Session session, Node node)
    {
        Optional<String> sessionCatalog = session.getCatalog();

        if (!sessionCatalog.isPresent()) {
            throw semanticException(MISSING_CATALOG_NAME, node, "Session catalog must be set");
        }

        return sessionCatalog.get();
    }