protected boolean isSelectDistinct(ASTNode expr) {
    return expr.getType() == HiveParser.TOK_SELECTDI;
  }
Returns the GBY, if present;
DISTINCT, if present, will be handled when generating the SELECT.
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java