public boolean isTargetRewritten() {
    // ANALYZE TABLE
    if (isExplicitAnalyze()) {
      return true;
    }
    // INSERT OVERWRITE
    LoadTableDesc ltd = getLoadTableDesc();
    if (ltd != null && (ltd.getLoadFileType() == LoadFileType.REPLACE_ALL || ltd.isInsertOverwrite())) {
      return true;
    }

    // CREATE TABLE ... AS
    if (getLoadFileDesc() != null && getLoadFileDesc().getCtasCreateTableDesc() != null) {
      return true;
    }
    // CREATE MV ... AS
    // ALTER MV ... REBUILD
    if (getLoadFileDesc() != null && getLoadFileDesc().getCreateViewDesc() != null) {
      return true;
    }
    return false;
  }
@param isNoScanAnalyzeCommand the isNoScanAnalyzeCommand to set
ql/src/java/org/apache/hadoop/hive/ql/plan/BasicStatsWork.java