Index: src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java =================================================================== --- src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java (revision 1354289) +++ src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java (working copy) @@ -241,4 +241,28 @@ } return (typeString = sb.toString().toLowerCase()); } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof HCatFieldSchema) + return this.equals((HCatFieldSchema) that); + return false; + } + + public boolean equals(HCatFieldSchema that) { + if (that == null) + return false; + if (that.getName().equals(this.fieldName) == false) { + return false; + } + if (that.getCategory().equals(this.category) == false) { + return false; + } + if (that.getTypeString().equals(this.getTypeString()) == false) { + return false; + } + return true; + } }