kpfly commented on PR #8910:
URL: https://github.com/apache/incubator-doris/pull/8910#issuecomment-1092390070

   Is there any test cases?
   
   jakevin ***@***.***> 于2022年4月8日周五 10:37写道:
   
   > Proposed changes
   >
   > Issue Number: close #7698
   > <https://github.com/apache/incubator-doris/issues/7698>
   > Problem Summary:
   >
   > Add optimizer feature: outer join to inner join when there is not null
   > predicate in joined table.
   >
   > Such as
   >
   > 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 <https://github.com/apache/incubator-doris/issues/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.
   > ------------------------------
   > You can view, comment on, or merge this pull request online at:
   >
   >   https://github.com/apache/incubator-doris/pull/8910
   > Commit Summary
   >
   >    - 9d41a4d
   >    
<https://github.com/apache/incubator-doris/pull/8910/commits/9d41a4df5b76820a248e282bdf4bea585f8c20c5>
   >    [feature](optimizer) : convert out join
   >
   > File Changes
   >
   > (9 files <https://github.com/apache/incubator-doris/pull/8910/files>)
   >
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/BetweenPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-110c512713eadfe5bed29e16367524d7eab9e9e10ea46f70fe86fd53c9d6cb69>
   >    (34)
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-f491835ce20e42c028131456251d8c55595f933c9cff3fa24cae8f49398c2cc8>
   >    (170)
   >    - *M*
   >    
fe/fe-core/src/main/java/org/apache/doris/analysis/CompoundPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-92f25580529a5e98927ebf1b29383e3d433f7658af1fa93fe79d4c56fc3db25c>
   >    (48)
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/ExistsPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-0e13d9745f68c92643c607f7b8c98c4eda4aea8f68fcf2bb1816f734cd0b8cfd>
   >    (16)
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/InPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-fbfd39c0da42d68e23e22ca3b74247273182ba49f2e952e6705667580836289b>
   >    (74)
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/IsNullPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-0ecc5cd89891416801cc309bd82ebb6eb5d7dfcced16938926e8dfdc073072b5>
   >    (14)
   >    - *M*
   >    fe/fe-core/src/main/java/org/apache/doris/analysis/LikePredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-583a418186aa7a91fcf5915cd8e19b523d5637058dbafba73020e3a5f2deb961>
   >    (9)
   >    - *M* fe/fe-core/src/main/java/org/apache/doris/analysis/Predicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-9347d4dfc7e1c90455a55580e068d3edaba470d4c7242549d2dd107261b95395>
   >    (33)
   >    - *M*
   >    
fe/fe-core/src/main/java/org/apache/doris/analysis/TupleIsNullPredicate.java
   >    
<https://github.com/apache/incubator-doris/pull/8910/files#diff-9335aa57ca3fe046573e7cd033907df9f237cde2da9aaed7cfafc78c2640a647>
   >    (47)
   >
   > Patch Links:
   >
   >    - https://github.com/apache/incubator-doris/pull/8910.patch
   >    - https://github.com/apache/incubator-doris/pull/8910.diff
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-doris/pull/8910>, or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/AXXX5T27ZQFRJMRGTVVZNELVD6LXHANCNFSM5S3FKB4Q>
   > .
   > You are receiving this because you are subscribed to this thread.Message
   > ID: ***@***.***>
   >
   


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