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
{{ message }}
Repository navigation
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
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}
Activity
Lordworms commentedon Apr 22, 2024
let me do this one