diff --git a/src/Processors/Transforms/buildPushingToViewsChain.cpp b/src/Processors/Transforms/buildPushingToViewsChain.cpp index 1be05135fe4..ade056629db 100644 --- a/src/Processors/Transforms/buildPushingToViewsChain.cpp +++ b/src/Processors/Transforms/buildPushingToViewsChain.cpp @@ -310,8 +310,8 @@ Chain buildPushingToViewsChain( if (lock == nullptr) { - // In case the materialized view is dropped at this point, we register a warning and ignore it - assert(materialized_view->is_dropped); + // In case the materialized view is dropped/detached at this point, we register a warning and ignore it + assert(materialized_view->is_dropped || materialized_view->is_detached); LOG_WARNING( &Poco::Logger::get("PushingToViews"), "Trying to access table {} but it doesn't exist", view_id.getFullTableName()); continue;