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

   Thanks @drin!
   
   My initial comment more came from the documentation perspective, since the 
monotonicity assumption is not obvious from the name `preimage`. So a developer 
may incorrectly implement `preimage` without knowing how it is actually used by 
the optimizer.
   
   Maybe we could define certain `monotonicity` method for scalar UDFs and 
consider this property in the optimizer. Using expression simplifier to invert 
monotonically decreasing functions makes sense for numeric functions, though 
I'm not sure if it works well for functions returning e.g. strings (whose 
monotonicity could also be well-defined).
   
   Glad to see the efforts in #18648!


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