Index: src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java =================================================================== --- src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java (revision 1354294) +++ src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java (working copy) @@ -241,4 +241,37 @@ } return (typeString = sb.toString().toLowerCase()); } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (!(obj instanceof HCatFieldSchema)) { + return false; + } + HCatFieldSchema other = (HCatFieldSchema) obj; + if (category != other.category) { + return false; + } + if (fieldName == null) { + if (other.fieldName != null) { + return false; + } + } else if (!fieldName.equals(other.fieldName)) { + return false; + } + if (typeString == null) { + if (other.typeString != null) { + return false; + } + } else if (!typeString.equals(other.typeString)) { + return false; + } + return true; + } + }