You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2019/04/09 14:15:04 UTC

[GitHub] [kylin] kyotoYaho commented on a change in pull request #533: kylin-3812 optimize the child CompareTupleFilter in a CompareTupleFilter

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