public static boolean isJoinToken(ASTNode node) {
    switch (node.getToken().getType()) {
    case HiveParser.TOK_JOIN:
    case HiveParser.TOK_LEFTOUTERJOIN:
    case HiveParser.TOK_RIGHTOUTERJOIN:
    case HiveParser.TOK_FULLOUTERJOIN:
      return true;
    default:
      return false;
    }
  }
Tests whether the parse tree node is a join token.

@param node
         The parse tree node
@return boolean
ql/src/java/org/apache/hadoop/hive/ql/parse/ParseUtils.java