jackwener opened a new pull request, #8910:
URL: https://github.com/apache/incubator-doris/pull/8910

   # Proposed changes
   
   Issue Number: close #7698
   
   ## Problem Summary:
   
   Add optimizer feature: outer join to inner join when there is not null 
predicate in joined table.
   
   Such as 
   
   ```sql
   select * 
   from table1 left join table2 
   on table1.siteid = table2.siteid 
   where table2.siteid > 0;
   
   ->
   
   select * 
   from table1 inner join table2 
   on table1.siteid = table2.siteid 
   where table2.siteid > 0;
   ``` 
   
   In this PR, if a table exist a non-null predicate in it, I will convert it 
join type
   - full outer join -> right outer join
   - left outer join -> inner join 
   
   to its next table:
   - full outer join -> left outer join
   - right outer join -> inner join
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (NO)
   2. Has unit tests been added: (No)
   3. Has document been added or modified: (No)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## Further comments
   
   in #7698. Just talk about two table join 
   
   - full outer -> inner if both sides have such predicates
   - left outer -> inner if the right side has such predicates
   - right outer -> inner if the left side has such predicates
   - full outer -> left outer if only the left side has such predicates
   - full outer -> right outer if only the right side has such predicates
   
   But for multi-table Join, it is worth noticing.
   
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to