diff --git a/src/Interpreters/InterpreterSelectQuery.cpp b/src/Interpreters/InterpreterSelectQuery.cpp index 7e65e20724e..901abf8641f 100644 --- a/src/Interpreters/InterpreterSelectQuery.cpp +++ b/src/Interpreters/InterpreterSelectQuery.cpp @@ -406,8 +406,8 @@ ASTPtr parseAdditionalFilterConditionForTable( for (const auto & additional_filter : additional_table_filters) { const auto & tuple = additional_filter.safeGet(); - auto & table = tuple.at(0).safeGet(); - auto & filter = tuple.at(1).safeGet(); + const auto & table = tuple.at(0).safeGet(); + const auto & filter = tuple.at(1).safeGet(); if (table == target.alias || (table == target.table && context.getCurrentDatabase() == target.database) ||