drin commented on issue #21955:
URL: https://github.com/apache/datafusion/issues/21955#issuecomment-4372157990

   I tried to address this in a PR which has gone a bit stale but hopefully 
gets movement soon. Here is a relevant commit in the PR: [18648 - 3326794 - 
R39-R52](https://github.com/apache/datafusion/pull/18648/changes/3326794cfa16bc34551a2d53701ce9da83b402e6#diff-3f015bb6ca85b8af8daaef1f0959e0b49ec6bcbcf675b9ea2d87d52a95893773R39-R52)
   
   You're right that `f(x) <= c --> x < u` does not hold in general. The 
existing implementation supports: (1) direct preimage (`c` is a value produced 
by `f`) and (2) contiguous, monotonically increasing intervals for `f(x)`.
   
   For (1), there is a lot of discussion in the mentioned PR (#18648) about 
trying to expand the definition to support preimage intervals (`c` is in an 
interval produced by `f`, e.g. `8.3` can be in `[8, 9)` even if `8.3` is not 
directly produced by `f`). That expansion won't get accepted until it's broken 
into a different PR, but maybe addresses part of your question.
   
   For (2), this portion of the commit [18648 - 3326794 - 
R149-R171](https://github.com/apache/datafusion/pull/18648/changes/3326794cfa16bc34551a2d53701ce9da83b402e6#diff-3f015bb6ca85b8af8daaef1f0959e0b49ec6bcbcf675b9ea2d87d52a95893773R149-R171)
 may expand a basic preimage test to provide a relevant example. In it, the 
intervals for `f(x)` are not adjacent (e.g. `[100, 200), [300, 400)`), so some 
boundary cases do not apply as if the intervals were adjacent (e.g. `[100, 
200), [200, 400)`).
   
   Finally, for (2), it is assumed that each interval is increasing and that 
assumption is built into the implementation in expr_simplifier. But, the result 
of expr_simplifier can be inverted for a monotonically decreasing function, 
which may not be clean and is probably not currently implemented/supported 
(though I'm not totally sure).


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