public void clear() {
    query = false;
    analyzeCommand = false;
    noScanAnalyzeCommand = false;
    analyzeRewrite = false;
    ctas = false;
    outerQueryLimit = -1;
    isMaterializedView = false;

    hasJoin = false;
    hasGroupBy = false;
    hasOrderBy = false;
    hasOuterOrderBy = false;
    hasSortBy = false;
    hasJoinFollowedByGroupBy = false;
    hasPTF = false;
    hasWindowing = false;
    hasQualify = false;
    hasExcept = false;
    hasIntersect = false;

    // does the query have a using clause
    usesScript = false;

    hasDistributeBy = false;
    hasClusterBy = false;
    mapJoinRemoved = false;
    hasMapGroupBy = false;

    noOfJoins = 0;
    noOfOuterJoins = 0;

    multiDestQuery = false;
    filterWithSubQuery = false;

    usedTables.clear();
  }
True indicates this statement create or replaces a materialized view, not that it is a query
against a materialized view.
ql/src/java/org/apache/hadoop/hive/ql/QueryProperties.java