kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [2/2] kylin git commit: KYLIN-2337 minor improvement, still give good error info
Date Sat, 07 Jan 2017 01:38:18 GMT
KYLIN-2337 minor improvement, still give good error info


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

Branch: refs/heads/master
Commit: 122b15a2a5fb7385e64839edfb9cbdaec5fde841
Parents: 7509bee
Author: Yang Li <liyang@apache.org>
Authored: Sat Jan 7 09:38:06 2017 +0800
Committer: Yang Li <liyang@apache.org>
Committed: Sat Jan 7 09:38:06 2017 +0800

----------------------------------------------------------------------
 .../kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/122b15a2/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java
----------------------------------------------------------------------
diff --git a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java
b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java
index 6a7e713..c5c95a6 100644
--- a/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java
+++ b/core-storage/src/main/java/org/apache/kylin/storage/gtrecord/SortedIteratorMergerWithLimit.java
@@ -126,7 +126,8 @@ public class SortedIteratorMergerWithLimit<E extends Cloneable>
extends SortedIt
 
             //TODO: remove this check when validated
             if (last != null) {
-                Preconditions.checkState(comparator.compare(last, fetched) <= 0, "Not
sorted!");
+                if (comparator.compare(last, fetched) > 0)
+                    throw new IllegalStateException("Not sorted! last: " + last + " fetched:
" + fetched);
             }
 
             last = fetched;


Mime
View raw message