private static void validateCheckExpr(ExprNodeDesc checkExpr) throws SemanticException {
    if (checkExpr instanceof ExprNodeGenericFuncDesc) {
      ExprNodeGenericFuncDesc funcDesc = (ExprNodeGenericFuncDesc)checkExpr;
      boolean isBuiltIn = FunctionRegistry.isBuiltInFuncExpr(funcDesc);
      boolean isPermanent = FunctionRegistry.isPermanentFunction(funcDesc);
      if (!isBuiltIn && !isPermanent) {
        throw new SemanticException(
            ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Temporary UDFs are not allowed in Check Constraints"));
      }

      if (FunctionRegistry.impliesOrder(funcDesc.getFuncText())) {
        throw new SemanticException(
            ErrorMsg.INVALID_CSTR_SYNTAX.getMsg("Window functions are not allowed in Check Constraints"));
      }
    }

    if (checkExpr.getChildren() == null) {
      return;
    }
    for (ExprNodeDesc childExpr:checkExpr.getChildren()) {
      validateCheckExpr(childExpr);
    }
  }
Validate and get the default value from the AST.
@param node AST node corresponding to default value
@return retrieve the default value and return it as string
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/constraint/ConstraintsUtils.java