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/01/13 10:58:28 UTC
[4/9] kylin git commit: KYLIN-1301 bug fix
KYLIN-1301 bug fix
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a3a6a4db
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a3a6a4db
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a3a6a4db
Branch: refs/heads/2.x-staging
Commit: a3a6a4db418a3fd8d643fe7cdf9dea124fbbcf11
Parents: 1f4854a
Author: honma <ho...@ebay.com>
Authored: Mon Jan 11 13:40:36 2016 +0800
Committer: honma <ho...@ebay.com>
Committed: Wed Jan 13 17:49:33 2016 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/gridtable/GTScanRangePlanner.java | 4 +---
.../kylin/storage/hbase/cube/v2/CubeSegmentScanner.java | 8 ++++----
2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/a3a6a4db/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
index dad0f7c..27fa6b4 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRangePlanner.java
@@ -49,9 +49,7 @@ public class GTScanRangePlanner {
* @param partitionColRef the TblColRef in GT
*/
public GTScanRangePlanner(GTInfo info, Pair<ByteArray, ByteArray> segmentStartAndEnd, TblColRef partitionColRef) {
- if (partitionColRef != null && segmentStartAndEnd == null) {
- throw new IllegalArgumentException("segmentStartAndEnd not provided when partitionColRef is set to " + partitionColRef);
- }
+
this.info = info;
this.segmentStartAndEnd = segmentStartAndEnd;
http://git-wip-us.apache.org/repos/asf/kylin/blob/a3a6a4db/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
----------------------------------------------------------------------
diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
index 6fc976b..246f1c4 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeSegmentScanner.java
@@ -78,14 +78,14 @@ public class CubeSegmentScanner implements IGTScanner {
GTScanRangePlanner scanRangePlanner;
if (cubeSeg.getCubeDesc().getModel().getPartitionDesc().isPartitioned()) {
TblColRef tblColRef = cubeSeg.getCubeDesc().getModel().getPartitionDesc().getPartitionDateColumnRef();
- Pair<ByteArray, ByteArray> segmentStartAndEnd;
+ TblColRef partitionColOfGT = null;
+ Pair<ByteArray, ByteArray> segmentStartAndEnd = null;
int index = mapping.getIndexOf(tblColRef);
if (index >= 0) {
segmentStartAndEnd = getSegmentStartAndEnd(index);
- } else {
- throw new IllegalStateException("Cannot found partition column on cuboid to gt mapping:" + tblColRef);
+ partitionColOfGT = info.colRef(index);
}
- scanRangePlanner = new GTScanRangePlanner(info, segmentStartAndEnd, info.colRef(index));
+ scanRangePlanner = new GTScanRangePlanner(info, segmentStartAndEnd,partitionColOfGT);
} else {
scanRangePlanner = new GTScanRangePlanner(info, null, null);
}