public static boolean hasEnabledOrValidatedConstraints(List<SQLNotNullConstraint> notNullConstraints,
      List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints) {
    if (notNullConstraints != null) {
      for (SQLNotNullConstraint nnC : notNullConstraints) {
        if (nnC.isEnable_cstr() || nnC.isValidate_cstr()) {
          return true;
        }
      }
    }

    if (defaultConstraints != null && !defaultConstraints.isEmpty()) {
      return true;
    }

    if (checkConstraints != null && !checkConstraints.isEmpty()) {
      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