v.20.6Bug Fix

Avoid "There is no query" Exception for Materialized Views with Joins or Subqueries

Avoid "There is no query" exception for materialized views with joins or with subqueries attached to system logs (system.query_log, metric_log, etc) or to engine=Buffer underlying table. #12120 (filimonov).