apache / datafusion

Apache DataFusion SQL Query Engine
https://datafusion.apache.org/
Apache License 2.0
5.48k stars 1.01k forks source link

Unify `ScalarUDF` and `ScalarFunction` #6282

Open jackwener opened 1 year ago

jackwener commented 1 year ago

Is your feature request related to a problem or challenge?

from https://github.com/apache/arrow-datafusion/pull/6281#discussion_r1187572265 @alamb

In fact, ScalarUDF and ScalarFunction both are function, and the usage is also similar.

Perhaps we might provide a way to unify them.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

alamb commented 1 year ago

I don't think this issue is completed quite yet

alamb commented 1 year ago

In particular, I think unifying these implementations would make it easier to add both built in functions (like what @izveigor is doing in https://github.com/apache/arrow-datafusion/pull/6149) as well as user defined functions -- as it would ensure that user defined functions had the same level of expressiveness / functionality as built in ones.