kylin-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [kylin] kyotoYaho commented on a change in pull request #533: kylin-3812 optimize the child CompareTupleFilter in a CompareTupleFilter
Date Tue, 09 Apr 2019 14:15:04 GMT
kyotoYaho commented on a change in pull request #533: kylin-3812 optimize the child CompareTupleFilter
in a CompareTupleFilter
URL: https://github.com/apache/kylin/pull/533#discussion_r273513936
 
 

 ##########
 File path: core-metadata/src/main/java/org/apache/kylin/metadata/filter/CompareTupleFilter.java
 ##########
 @@ -283,6 +289,20 @@ public TupleFilter acceptOptimizeTransformer(FilterOptimizeTransformer
transform
         return transformer.visit(this);
     }
 
+    private TupleFilter optimizeChildCompareTupleFilter(CompareTupleFilter child) {
+        FilterOptimizeTransformer transformer = new FilterOptimizeTransformer();
+        TupleFilter result = child.acceptOptimizeTransformer(transformer);
+        if (result == ConstantTupleFilter.TRUE) {
+            // use string instead of boolean since it's encoded as string
+            result = new ConstantTupleFilter("true");
+        } else if (result == ConstantTupleFilter.FALSE) {
+            result = new ConstantTupleFilter("false");
+        } else {
+            this.isNormal = false;
 
 Review comment:
   Why do you think AlwaysTrue or AlwaysFalse cannot be pushed down? Current CompareTupleFilter
does not well support the case that both children are CompareTupleFilter. Therefore, push
down will be disabled. This behavior is not changed.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message