You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ma...@apache.org on 2016/11/01 01:40:41 UTC

kylin git commit: bug fix in integer as partition column

Repository: kylin
Updated Branches:
  refs/heads/yang21 d155263a2 -> 01d68fac8


bug fix in integer as partition column


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

Branch: refs/heads/yang21
Commit: 01d68fac8a80f08aff065c4a7aba0ab84f36baaa
Parents: d155263
Author: Hongbin Ma <ma...@apache.org>
Authored: Tue Nov 1 09:40:46 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Tue Nov 1 09:40:46 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/01d68fac/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java
index b4a82d4..8ceb841 100644
--- a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java
+++ b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java
@@ -24,10 +24,10 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.kylin.common.util.ByteArray;
 import org.apache.kylin.common.util.DateFormat;
 import org.apache.kylin.common.util.Pair;
-import org.apache.kylin.metadata.model.ISegment;
 import org.apache.kylin.dimension.AbstractDateDimEnc;
 import org.apache.kylin.gridtable.GTInfo;
 import org.apache.kylin.metadata.datatype.DataType;
+import org.apache.kylin.metadata.model.ISegment;
 
 public class SegmentGTStartAndEnd {
     private ISegment segment;
@@ -67,7 +67,7 @@ public class SegmentGTStartAndEnd {
             value = DateFormat.formatToDateStr(ts);
         } else if (partitionColType.isTimeFamily()) {
             value = DateFormat.formatToTimeWithoutMilliStr(ts);
-        } else if (partitionColType.isStringFamily()) {
+        } else if (partitionColType.isStringFamily() || partitionColType.isIntegerFamily()) {//integer like 20160101
             String partitionDateFormat = segment.getModel().getPartitionDesc().getPartitionDateFormat();
             if (StringUtils.isEmpty(partitionDateFormat))
                 partitionDateFormat = DateFormat.DEFAULT_DATE_PATTERN;