Skip to content

Move stable function evaluation into invoke() instead of simplify() #19470

@adriangb

Description

@adriangb

As discussed in #19426 currently evaluation of stable functions is handled in ScalarUDFImpl::simplify().
It would be nicer if it could be handled in ScalarUDFImpl::invoke_with_args:

  1. If no simplifier is run the function can have runtime behavior, e.g. returning the fixed execution time.
  2. If a simplifier is run the simplifier can call invoke_with_args to hit the same code path.

This seems to require refactoring PhysicalExpr::evaluate(RecordBatch) into PhysicalExpr::evaluate_with_args(EvaluateArgs) where EvaluateArgs is symmetrical to ScalarFunctionArgs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions