datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Remove ScalarFunctionDefinition

Open Omega359 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem or challenge?

As noted in https://github.com/apache/datafusion/pull/10098#discussion_r1573853541 The ScalarFunctionDefinition::Name is seemingly unused which means that ScalarFunctionDefinition is essentially a simple wrapper to Arc<crate::ScalarUDF> and thus may be a candidate for removal. This would simplify the code slightly and remove a number of code blocks such as

ScalarFunctionDefinition::Name(_) => {
    internal_err!("Function `Expr` with name should be resolved.")
}

Describe the solution you'd like

ScalaraFunctionDefinition is removed and all code references updated.

Describe alternatives you've considered

Leave the code as is. Or possibly just remove the ScalarFunctionDefinition::Name(_) enum

Additional context

No response

Omega359 avatar Apr 22 '24 11:04 Omega359