appletreeisyellow commented on issue #9171:
URL: 
https://github.com/apache/arrow-datafusion/issues/9171#issuecomment-1942802193

   > I think this would only be valid for top level expressions in the `AND` 
clause (not any arbitrary sub expression)
   
   Do you mean something like this?
   
   For example, rewriting a complicated predicate like `x < 5 AND x > 0`
   
   instead of
   
   ```sql
   x_max < 5 AND 0 < x_min
   ```
   
   To something like (a)
   
   ```sql
   CASE
     WHEN x_null_count = x_row_count THEN false
     ELSE x_max < 5 AND 0 < x_min
   END
   ```
   
   I don't think we want it to be (b)
   
   ```sql
   CASE
     WHEN x_null_count = x_row_count THEN false
     ELSE x_max < 5
   END
   AND
   CASE
     WHEN x_null_count = x_row_count THEN false
     ELSE 0 < x_min
   END
   ```


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