[ 
https://issues.apache.org/jira/browse/CALCITE-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17538687#comment-17538687
 ] 

Ruben Q L edited comment on CALCITE-5073 at 5/18/22 9:34 AM:
-------------------------------------------------------------

Sorry, I will be a bit busy this and next weeks, I will not have too much time 
for reviews.
Personally, I'm not against inserting this logic in the existing 
JoinConditionPushRule as the PR proposes. Maybe there is a better alternative? 
Maybe, but so far I have not seen a concrete explanation of what this 
alternative should look like.


was (Author: rubenql):
Sorry, I will be a bit busy this and next weeks, I will not have too much time 
for reviews.
Personally, I'm not against inserting this logic in the existing 
JoinConditionPushRule as the PR proposes. Maybe there is a better alternative ? 
Maybe, but so far I have not seen a concrete explanation of what this 
alternative should look like.

> JoinConditionPushRule cannot infer 'LHS.C1 = LHS.C2' from 'LHS.C1 = RHS.C1 
> AND LHS.C2 = RHS.C1'
> -----------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-5073
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5073
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.30.0
>            Reporter: Benchao Li
>            Assignee: Benchao Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.31.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> For the below SQL:
> {code:java}
> SELECT * FROM T1, T2, T3
> WHERE T1.id = T3.id AND T2.id = T3.id{code}
> Currently, JoinConditionPushRule cannot infer the condition 'T1.id = T2.id' 
> for the first join relation.
> There is another rule {{JoinPushThroughJoinRule}}, it can handle the above 
> case in a different way (by reordering joins).
> This can be a more general optimization, which like the title says, we can 
> infer more conditions from join condition (or above filter condition) to the 
> Join's operands.
> It's reported in ML: 
> https://lists.apache.org/thread/6fs09cgyz5rzrty90632ywoo477q0gdk



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to