private static boolean isDefaultValueAllowed(ExprNodeDesc defaultValExpr) {
    while (FunctionRegistry.isOpCast(defaultValExpr)) {
      defaultValExpr = defaultValExpr.getChildren().get(0);
    }

    if (defaultValExpr instanceof ExprNodeConstantDesc) {
      return true;
    }

    if (defaultValExpr instanceof ExprNodeGenericFuncDesc) {
      for (ExprNodeDesc argument : defaultValExpr.getChildren()) {
        if (!isDefaultValueAllowed(argument)) {
          return false;
        }
      }
      return true;
    }

    return false;
  }
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