Extend assertion in buildPushingToViewsChain() to respect is_detached

Follow-up for: #45566 (@tavplubix)
Refs: #43161 (@AlfVII)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2023-01-25 15:41:35 +01:00
parent ff137721fb
commit 71286e779e

View File

@ -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;