Repository: kylin
Updated Branches:
  refs/heads/yang22-cdh5.7 760de8238 -> fb823584a (forced update)


KYLIN-2497 fix minor bug to support long type


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

Branch: refs/heads/yang22-cdh5.7
Commit: 50955963d117a8a0a05b756cecbb6b1c6d06647d
Parents: e477b51
Author: Hongbin Ma <mahong...@apache.org>
Authored: Sat Mar 11 16:58:06 2017 +0800
Committer: Hongbin Ma <mahong...@apache.org>
Committed: Sat Mar 11 16:58:06 2017 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/50955963/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java
----------------------------------------------------------------------
diff --git 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java
 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java
index acec972..bb4152e 100644
--- 
a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java
+++ 
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/SelfDefineSortableKey.java
@@ -50,7 +50,7 @@ public class SelfDefineSortableKey implements 
WritableComparable<SelfDefineSorta
         if (isNumberFamily()) {
             String valueStr = new String(key.getBytes(), 1, key.getLength() - 
1);
             if (isIntegerFamily()) {
-                this.keyInObj = Integer.parseInt(valueStr);
+                this.keyInObj = Long.parseLong(valueStr);
             } else {
                 this.keyInObj = Double.parseDouble(valueStr);
             }
@@ -71,7 +71,7 @@ public class SelfDefineSortableKey implements 
WritableComparable<SelfDefineSorta
             return ((Text) this.keyInObj).compareTo(((Text) o.keyInObj));
         } else {
             if (isIntegerFamily()) {
-                return Integer.compare((Integer) this.keyInObj, (Integer) 
o.keyInObj);
+                return Long.compare((Long) this.keyInObj, (Long) o.keyInObj);
             } else {
                 return Double.compare((Double) this.keyInObj, (Double) 
o.keyInObj);
             }

Reply via email to