<https://clickhouse-test-reports.s3.yandex.net/25969/86d31445fd0dd9bc086432f559d1089c3d4a7700/fuzzer_debug/report.html#fail1>
std::unique_ptr<ThreadStatus> view_thread_status_ptr = nullptr;
        ThreadGroupStatusPtr running_group = current_thread && current_thread->getThreadGroup()
            ? current_thread->getThreadGroup()
            : MainThreadStatus::getInstance().getThreadGroup();
        if (running_group)
        {
            
            
            
            
            auto * original_thread = current_thread;
            SCOPE_EXIT({ current_thread = original_thread; });
            view_thread_status_ptr = std::make_unique<ThreadStatus>();
            
            
            
            view_thread_status_ptr->disableProfiling();
            view_thread_status_ptr->attachQuery(running_group);
        }
        auto runtime_stats = std::make_unique<QueryViewsLogElement::ViewRuntimeStats>();
        runtime_stats->target_name = database_table.getFullTableName();
        runtime_stats->thread_status = std::move(view_thread_status_ptr);
        runtime_stats->event_time = std::chrono::system_clock::now();
        runtime_stats->event_status = QueryViewsLogElement::ViewStatus::EXCEPTION_BEFORE_START;
        auto & type = runtime_stats->type;
        auto & target_name = runtime_stats->target_name;
        auto * view_thread_status = runtime_stats->thread_status.get();
        auto * view_counter_ms = &runtime_stats->elapsed_ms;
        if (auto * materialized_view = dynamic_cast<StorageMaterializedView *>(dependent_table.get()))