vaful 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_r269391463
##########
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:
this means that TupleFilters excepted AlwaysTrue or AlwaysFalse will not
pushdown?
----------------------------------------------------------------
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