private boolean hasConstraints(final List<FieldSchema> partCols, final List<SQLDefaultConstraint> defConstraints,
                         final List<SQLNotNullConstraint> notNullConstraints,
                         final List<SQLCheckConstraint> checkConstraints) {
    for(FieldSchema partFS: partCols) {
      for(SQLDefaultConstraint dc:defConstraints) {
        if(dc.getColumn_name().equals(partFS.getName())) {
          return true;
        }
      }
      for(SQLCheckConstraint cc:checkConstraints) {
        if(cc.getColumn_name().equals(partFS.getName())) {
          return true;
        }
      }
      for(SQLNotNullConstraint nc:notNullConstraints) {
        if(nc.getColumn_name().equals(partFS.getName()) && nc.isEnable_cstr()) {
          return true;
        }
      }
    }
    return false;
  }
Checks to see if given partition columns has DEFAULT or CHECK constraints (whether ENABLED or DISABLED)
 Or has NOT NULL constraints (only ENABLED)
@param partCols partition columns
@param defConstraints default constraints
@param notNullConstraints not null constraints
@param checkConstraints CHECK constraints
@return true or false
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java