You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "adriangb (via GitHub)" <gi...@apache.org> on 2025/12/20 04:15:31 UTC

[I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

adriangb opened a new issue, #19418:
URL: https://github.com/apache/datafusion/issues/19418

   ### Is your feature request related to a problem or challenge?
   
   I'm doing some rewrites where I want to handle `now()`, but if I run the query through the optimizer if evaluates it using the current time.
   
   ### Describe the solution you'd like
   
   
   I'd like to add a configuration to `OptimzierConfig` to disable these evaluations: `evaluate_stable_functions = false;`
   
   ### Describe alternatives you've considered
   
   Wrapping every stable function in a UDF that is pass through but modifies the signature to `Immutable`. This is complex and error prone (there's like a dozen methods in the UDF trait).
   
   ### Additional context
   
   _No response_


-- 
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: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

Posted by "manishkr (via GitHub)" <gi...@apache.org>.
manishkr commented on issue #19418:
URL: https://github.com/apache/datafusion/issues/19418#issuecomment-3678501730

   @adriangb It's ok. As I see Jefffrey already reviewing it. Added a `nit` comment.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb closed issue #19418: option to disable evaluation of stable expressions in optimizer rules
URL: https://github.com/apache/datafusion/issues/19418


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #19418:
URL: https://github.com/apache/datafusion/issues/19418#issuecomment-3677863629

   Sorry @manishkr I had set up Claude to solve it last night but didn't push. Could you maybe review the PR? If you have any suggestions on wording, etc. I can commit those and that will include you as a co-author.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

Posted by "manishkr (via GitHub)" <gi...@apache.org>.
manishkr commented on issue #19418:
URL: https://github.com/apache/datafusion/issues/19418#issuecomment-3677473096

   take


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] option to disable evaluation of stable expressions in optimizer rules [datafusion]

Posted by "adriangb (via GitHub)" <gi...@apache.org>.
adriangb commented on issue #19418:
URL: https://github.com/apache/datafusion/issues/19418#issuecomment-3687542602

   This would solve:
   
   https://github.com/apache/datafusion/blob/d8e68a404aa7955b4913bab1c658a4ec5c82f0fc/datafusion/core/src/execution/context/mod.rs#L752-L756


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org