You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hcatalog-commits@incubator.apache.org by av...@apache.org on 2012/06/28 20:11:28 UTC
svn commit: r1355144 - in /incubator/hcatalog/trunk: CHANGES.txt
src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
Author: avandana
Date: Thu Jun 28 20:11:25 2012
New Revision: 1355144
URL: http://svn.apache.org/viewvc?rev=1355144&view=rev
Log:
HCAT-438 HCatFieldSchema class does not have equals() method implementation
Modified:
incubator/hcatalog/trunk/CHANGES.txt
incubator/hcatalog/trunk/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
Modified: incubator/hcatalog/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1355144&r1=1355143&r2=1355144&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Thu Jun 28 20:11:25 2012
@@ -55,6 +55,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/trunk/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/trunk/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java?rev=1355144&r1=1355143&r2=1355144&view=diff
==============================================================================
--- incubator/hcatalog/trunk/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java (original)
+++ incubator/hcatalog/trunk/src/java/org/apache/hcatalog/data/schema/HCatFieldSchema.java Thu Jun 28 20:11: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;
+ }
+
}