[
https://issues.apache.org/jira/browse/KYLIN-5865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865885#comment-17865885
]
pengfei.zhan commented on KYLIN-5865:
-------------------------------------
h1. Dev Design
Remove this code in FilterJoinRule in kycalcite , so that the rule is not
interrupted to take effect, the code to be removed is as follows:
{code:java}
// HACK POINT
if (join.getJoinType() ! = JoinRelType.INNER || joinFilters.size() ! = 0) {
joinFilters.size() ! = 0) { return;
} {code}
Add a method `canPushIntoFromAbove` to control whether to push down the filter
above the join to the condition of the join, default is true. Please refer to
https://issues.apache.org/jira/browse/CALCITE-3089.
Add a rule FILTER_ON_JOIN in OlapFilterJoinRule, overriding the new
canPushIntoFromAbove method in Calcite
* No filter push down to join when filter contains CCs
* When the type of the condition of the fitler is =, both the left and right
operands need to be column references of the table to be pushed down, otherwise
they will not be pushed down (the model matching of KE is related to the
columns of the table, and the logic is consistent with the OlapJoinRel's
translateJoinColumn method).
* When the condition type of the fitler is AND, all operands in it need to
satisfy the second rule.
Let this rule works at the stage of `postOptimize` stage in kylin.
> Supports OlapFilterJoinRule.FILTER_ON_JOIN
> ------------------------------------------
>
> Key: KYLIN-5865
> URL: https://issues.apache.org/jira/browse/KYLIN-5865
> Project: Kylin
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 5.0.0
> Reporter: pengfei.zhan
> Assignee: pengfei.zhan
> Priority: Major
> Fix For: 5.0.0
>
> Attachments: 8813.1.png, 8813.2.png, 8813.3.png, 8813.4.png
>
>
> The following SQL hit index problem, casually add a filter condition will
> lead to repair failure, resulting in the query hit aggregation + detail, the
> expectation is to hit the aggregate index.
> !8813.1.png!
> !8813.2.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)