public boolean isSimpleSelectQuery() {
    if (!qbp.isSimpleSelectQuery() || isCTAS() || qbp.isAnalyzeCommand()) {
      return false;
    }
    for (QBExpr qbexpr : aliasToSubq.values()) {
      if (!qbexpr.isSimpleSelectQuery()) {
        return false;
      }
    }
    return true;
  }
Set to true in SemanticAnalyzer.getMetadataForDestFile,
if destination is a file and query is not CTAS
@return
ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java