incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From avand...@apache.org
Subject svn commit: r1355146 - in /incubator/hcatalog/branches/branch-0.4: CHANGES.txt src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
Date Thu, 28 Jun 2012 20:23:26 GMT
Author: avandana
Date: Thu Jun 28 20:23:25 2012
New Revision: 1355146

URL: http://svn.apache.org/viewvc?rev=1355146&view=rev
Log:
HCAT-438 HCatFieldSchema class does not have equals() method implementation (merged from trunk)

Modified:
    incubator/hcatalog/branches/branch-0.4/CHANGES.txt
    incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java

Modified: incubator/hcatalog/branches/branch-0.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/CHANGES.txt?rev=1355146&r1=1355145&r2=1355146&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.4/CHANGES.txt Thu Jun 28 20:23:25 2012
@@ -49,6 +49,8 @@ Trunk (unreleased changes)
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-438 HCatFieldSchema class does not have equals() method implementation (avandana)
+
   HCAT_416 MultiOutputFormat should handle merging of DistributedCache configurations (rohini
via avandana)
 
   HCAT-423 HCatalog should include SerDe-reported fields in the table schema (traviscrawford
via khorgath)

Modified: incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java?rev=1355146&r1=1355145&r2=1355146&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
(original)
+++ incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
Thu Jun 28 20:23:25 2012
@@ -241,4 +241,37 @@ public class HCatFieldSchema implements 
         }
         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 (this.getTypeString() == null) {
+            if (other.getTypeString() != null) {
+                return false;
+            }
+        } else if (!this.getTypeString().equals(other.getTypeString())) {
+            return false;
+        }
+        return true;
+    }
+
 }



Mime
View raw message