This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch 3.0.x in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 17777e929df99eb595d32eb696ad1db71035438c Author: nichunen <[email protected]> AuthorDate: Sun Jan 12 18:42:25 2020 +0800 Fix "equals" on incomparable types --- .../java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java index 1f75660..12c30ea 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java @@ -23,6 +23,7 @@ import java.net.URLDecoder; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map; @@ -286,7 +287,7 @@ public class HFileOutputFormat3 extends FileOutputFormat<ImmutableBytesWritable, TreeSet<ImmutableBytesWritable> sorted = new TreeSet<ImmutableBytesWritable>(startKeys); ImmutableBytesWritable first = sorted.first(); - if (!first.equals(HConstants.EMPTY_BYTE_ARRAY)) { + if (!Arrays.equals(first.get(), HConstants.EMPTY_BYTE_ARRAY)) { throw new IllegalArgumentException("First region of table should have empty start key. Instead has: " + Bytes.toStringBinary(first.get())); }
