lvheyang edited a comment on issue #723:
URL: 
https://github.com/apache/arrow-datafusion/issues/723#issuecomment-883007802


   For now I have just found 2 bad cases:
   
   1. `select c0, ABS(c0 - 251.10794896957802) from foo where ABS(c0 - 
251.10794896957802) < 111;`
   2. `select c0, (250-c0) > 0 from foo where (250-c0) > 0`
   
   The common point is that `abs(col) ` and  `-1 * col` reverse the 
monotonicity of the column. Such complex expressions are really hard to deal 
with. >< 
   
   
   > 2. Limit to pruning simple expressions
   
   To accomplish this target, I plan to limit pruning only to such simple 
expressions
   
   1. column with boolean type
   2. simple arithmetic (`+ - * /`) and comparison (`> = < >= <= !=`) 
expression, before we generating predicate, we should normalize the expression 
to such form:
       * `a * left(col) compare right(literal expression) ` where `a > 0`
   3. compound logical relation (and or not), may consist of one or many 
expressions 
   
   which we may not support by now:
   1. scalar functions act on columns
   2. expressions with 2 or more columns
   
   This plan is not the final version, it may be changed since I encountered 
difficulties. 
   
   
   
   
   
   


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