private void validateCreateView(AlterViewAsDesc desc, SemanticAnalyzer analyzer) throws SemanticException {
    validateTablesUsed(analyzer);

    Table oldView = null;
    try {
      oldView = getTable(desc.getViewName(), false);
    } catch (HiveException e) {
      throw new SemanticException(e.getMessage(), e);
    }

    if (oldView == null) {
      String viewNotExistErrorMsg = "The following view does not exist: " + desc.getViewName();
      throw new SemanticException(ErrorMsg.ALTER_VIEW_AS_SELECT_NOT_EXIST.getMsg(viewNotExistErrorMsg));
    }

    validateReplaceWithPartitions(desc.getViewName(), oldView, null);
  }
Analyzer for alter view ... as commands.
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/create/AlterViewAsAnalyzer.java