You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by bi...@apache.org on 2017/02/10 09:03:44 UTC

[10/17] kylin git commit: minor, decorateScanner can skip filter only

minor, decorateScanner can skip filter only

Signed-off-by: Hongbin Ma <ma...@apache.org>


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

Branch: refs/heads/KYLIN-2428
Commit: f456961986e5c6ab94080a0fa74fa86c1a33c273
Parents: abf5332
Author: Roger Shi <ro...@hotmail.com>
Authored: Thu Feb 9 17:14:57 2017 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Thu Feb 9 17:35:05 2017 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/kylin/gridtable/GTScanRequest.java | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/f4569619/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
----------------------------------------------------------------------
diff --git a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
index c45f90c..7976e3f 100644
--- a/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
+++ b/core-cube/src/main/java/org/apache/kylin/gridtable/GTScanRequest.java
@@ -166,13 +166,20 @@ public class GTScanRequest {
      * Refer to CoprocessorBehavior for explanation
      */
     public IGTScanner decorateScanner(IGTScanner scanner, boolean filterToggledOn, boolean aggrToggledOn, long deadline) throws IOException {
+        return decorateScanner(scanner, filterToggledOn, aggrToggledOn, false, deadline);
+    }
+
+    /**
+     * hasPreFiltered indicate the data has been filtered before scanning
+     */
+    public IGTScanner decorateScanner(IGTScanner scanner, boolean filterToggledOn, boolean aggrToggledOn, boolean hasPreFiltered, long deadline) throws IOException {
         IGTScanner result = scanner;
         if (!filterToggledOn) { //Skip reading this section if you're not profiling! 
             int scanned = lookAndForget(result);
             return new EmptyGTScanner(scanned);
         } else {
 
-            if (this.hasFilterPushDown()) {
+            if (this.hasFilterPushDown() && !hasPreFiltered) {
                 result = new GTFilterScanner(result, this);
             }