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 any of its children is a
CompareTupleFilter and is not alway true or always false. Only in this case
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:
[email protected]
With regards,
Apache Git Services