This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit d660d6b183f516b65c2af21cf5e59ad6b32da5e0
Author: etherge <ethe...@163.com>
AuthorDate: Fri Feb 14 18:39:44 2020 -0500

    minor, compareTo should not be overloaded
---
 .../main/java/org/apache/kylin/engine/mr/ByteArrayWritable.java    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/ByteArrayWritable.java 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/ByteArrayWritable.java
index 037ab0b..62f20b0 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/ByteArrayWritable.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/ByteArrayWritable.java
@@ -113,7 +113,8 @@ public class ByteArrayWritable implements 
WritableComparable<ByteArrayWritable>
      *         negative if left is smaller than right.
      */
     public int compareTo(ByteArrayWritable that) {
-        return WritableComparator.compareBytes(this.data, this.offset, 
this.length, that.data, that.offset, that.length);
+        return WritableComparator.compareBytes(this.data, this.offset, 
this.length, that.data, that.offset,
+                that.length);
     }
 
     /**
@@ -122,7 +123,7 @@ public class ByteArrayWritable implements 
WritableComparable<ByteArrayWritable>
      * @return Positive if left is bigger than right, 0 if they are equal, and
      *         negative if left is smaller than right.
      */
-    public int compareTo(final byte[] that) {
+    public int compareToByteArray(final byte[] that) {
         return WritableComparator.compareBytes(this.data, this.offset, 
this.length, that, 0, that.length);
     }
 
@@ -132,7 +133,7 @@ public class ByteArrayWritable implements 
WritableComparable<ByteArrayWritable>
     @Override
     public boolean equals(Object other) {
         if (other instanceof byte[]) {
-            return compareTo((byte[]) other) == 0;
+            return compareToByteArray((byte[]) other) == 0;
         }
         if (other instanceof ByteArrayWritable) {
             return compareTo((ByteArrayWritable) other) == 0;

Reply via email to