public static boolean isBuiltInFuncExpr(ExprNodeGenericFuncDesc fnExpr) {
    GenericUDF udf = fnExpr.getGenericUDF();
    if (udf == null) {
      return false;
    }

    Class clazz = udf.getClass();
    if (udf instanceof GenericUDFBridge) {
      clazz = ((GenericUDFBridge)udf).getUdfClass();
    }

    if (clazz != null) {
      return system.isBuiltInFunc(clazz);
    }
    return false;
  }
@param fnExpr Function expression.
@return True iff the fnExpr represents a hive built-in function (native, non-permanent)
ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java