alamb commented on issue #1342:
URL: 
https://github.com/apache/arrow-datafusion/issues/1342#issuecomment-974635648


   @liukun4515  note this optimization is only valid prior to any OUTER joins 
(and maybe other operators) -- you would have to check
   
   So like if x is non null, 
   
   ```
   SELECT ... FROM foo WHERE x IS NOT NULL
   ```
   Can be rewritten to 
   ```
   SELECT ... FROM foo 
   ```
   
   However, 
   
   ```sql
   SELECT ... FROM foo LEFT JOIN bar ON (a=b AND  x IS NOT NULL)
   ```
   
   Can NOT be rewritten to 
   ```
   SELECT ... FROM foo LEFT JOIN bar ON (a=b)
   ```
   
   The same general pattern applies in the select list 


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