Repository: kylin
Updated Branches:
  refs/heads/minor_d [created] dc0a3cee5


minor, add equals and hashcode to RowKeyColDesc


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/dc0a3cee
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/dc0a3cee
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/dc0a3cee

Branch: refs/heads/minor_d
Commit: dc0a3cee5e517172d0f4a437152ff64233a3f830
Parents: d1175d2
Author: lidongsjtu <lid...@apache.org>
Authored: Sat Dec 17 13:46:22 2016 +0800
Committer: lidongsjtu <lid...@apache.org>
Committed: Sun Dec 18 21:41:21 2016 +0800

----------------------------------------------------------------------
 .../apache/kylin/cube/model/RowKeyColDesc.java  | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/dc0a3cee/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
----------------------------------------------------------------------
diff --git 
a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java 
b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
index 3b49323..ef34a9b 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/model/RowKeyColDesc.java
@@ -155,8 +155,34 @@ public class RowKeyColDesc {
     }
 
     @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((column == null) ? 0 : column.hashCode());
+        return result;
+    }
+
+    @Override
     public String toString() {
         return Objects.toStringHelper(this).add("column", 
column).add("encoding", encoding).toString();
     }
 
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) {
+            return true;
+        }
+
+        if (o == null || getClass() != o.getClass()) {
+            return false;
+        }
+
+        RowKeyColDesc that = (RowKeyColDesc) o;
+
+        if (column != null ? !column.equals(that.column) : that.column != 
null) {
+            return false;
+        }
+
+        return true;
+    }
 }
\ No newline at end of file

Reply via email to