public static boolean isOpAndOrNot(ExprNodeDesc desc) {
    Class<? extends GenericUDF> genericUdfClass = getGenericUDFClassFromExprDesc(desc);
    return GenericUDFOPAnd.class == genericUdfClass
        || GenericUDFOPOr.class == genericUdfClass
        || GenericUDFOPNot.class == genericUdfClass;
  }
Returns whether the exprNodeDesc is a node of "and", "or", "not".
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java