AssHero opened a new issue, #2757:
URL: https://github.com/apache/arrow-datafusion/issues/2757

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   For query: select ... from a left join b on ... where b.xx = 100;
   
   if b.xx is null, and b.xx = 100 returns false, filterd those null rows.
   Therefore, there is no need to produce null rows for output, we can use
   inner join instead of left join.
   
   we can optimize above query to select ... from a join b on ... where b.xx = 
100;
   
   Generally, right join/full join can also be reduced to inner join according 
to these rules.
   
   such as  
   select ... from a right join b on .... where a.xx is not null; ===> select 
... from a join b on .... where a.xx is not null;
   
   **Describe the solution you'd like**
   As above.
   
   **Describe alternatives you've considered**
   None
   
   **Additional context**
   None
   


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

Reply via email to