public void addSubqExprAlias(ASTNode expressionTree, SemanticAnalyzer semanticAnalyzer) throws SemanticException {
    String alias = "__subexpr" + subQueryExpressionAliasCounter++;

    // Recursively do the first phase of semantic analysis for the subquery
    QBExpr qbexpr = new QBExpr(alias);

    ASTNode subqref = (ASTNode) expressionTree.getChild(1);
    semanticAnalyzer.doPhase1QBExpr(subqref, qbexpr, getId(), alias, isInsideView(), null);

    // Insert this map into the stats
    aliasToSubqExpr.put(alias, qbexpr);
    addAlias(alias);
  }
returns true, if the query block contains any query, or subquery without a source table
Like select current_user(), select current_database()
@return true, if the query block contains any query without a source table
ql/src/java/org/apache/hadoop/hive/ql/parse/QB.java