You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding the new API is_short_circuits()(default to false, when need set to true) to ScalarUDF and ScalarUDFImpl might be a good way to do this because users may want to define their own short-circuit functions.
#10162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Adding the new API `is_short_circuits()`(default to false, when need set to true) to `ScalarUDF` and `ScalarUDFImpl` might be a good way to do this because users may want to define their own short-circuit functions.
So that would me add a function to ScalarUDFImpl like the following (and remove the check for "coalsce" in the code)
traitScalarUDFImpl{
..
/// Returns true if some of this `exprs` subexpressions may not be evaluated/// and thus any side effects (like divide by zero) may not be encountered/// Setting this to true prevents certain optimizations such as common subexpression elimination
fn short_circuits() -> bool{false}
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem or challenge?
As part of consolidating ScalarUDFs in #10098, @Omega359 and @haohuaijin noted that there is still a special case for
coalesce
. Specifically, #10098 (comment)_Describe the solution you'd like
So that would me add a function to
ScalarUDFImpl
like the following (and remove the check for "coalsce" in the code)Then return
true
in the implementation ofCoalsce
Originally posted by @haohuaijin in #10098 (comment)
The text was updated successfully, but these errors were encountered: