public boolean hasTableDefined() {
    return !(aliases.size() == 1 && aliases.get(0).equals(SemanticAnalyzer.DUMMY_TABLE));
  }
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