morrySnow opened a new issue, #11526:
URL: https://github.com/apache/doris/issues/11526

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### Version
   
   - master
   - 1.1.2
   - 1.1.1
   - 1.1.0
   
   ### What's Wrong?
   
   push constant expr in predicate to outer join's other conjuncts by mistake
   
   ### What You Expected?
   
   do not push constant expr in predicate to outer join's other conjuncts
   
   ### How to Reproduce?
   
   ```sql
   CREATE TABLE if not EXISTS `wftest1` (
    `aa` varchar(200) NULL COMMENT "",
    `bb` int NULL COMMENT ""
   ) ENGINE = OLAP 
   UNIQUE KEY (`aa`) COMMENT "aa" 
   DISTRIBUTED BY HASH (`aa`) BUCKETS 3 PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
   );
    
   CREATE TABLE if not EXISTS `wftest2` (
    `cc` varchar(200) NULL COMMENT "",
    `dd` int NULL COMMENT ""
   ) ENGINE = OLAP UNIQUE KEY (`cc`) COMMENT "cc" DISTRIBUTED BY HASH (`cc`) 
BUCKETS 3 PROPERTIES (
    "replication_allocation" = "tag.location.default: 1"
   );
   
   INSERT INTO  wftest1 VALUES ('a', 1), ('b', 1), ('c', 1);
   INSERT INTO  wftest2 VALUES ('a', 1), ('b', 1), ('d', 1);
   
   select t.* from (select  * from wftest1 t1 left join wftest2 t2 on 
t1.aa=t2.cc) t where dayofweek(current_date())=2; 
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to