alamb opened a new issue, #12648:
URL: https://github.com/apache/datafusion/issues/12648

   ### Is your feature request related to a problem or challenge?
   
   Part of https://github.com/apache/datafusion/issues/8709
   
   There is now no difference between "built in" / "prepackaged"  scalar and 
aggregate functions in DataFusion, however there are still some ["built in" 
window functions 
](https://github.com/apache/datafusion/blob/9b4f90ad1eefabdc0d5bbbfd99e58765b041bb77/datafusion/expr/src/built_in_window_function.rs#L42-L69)
 -- see the current source for 
[`BuiltInWindowFunction`](https://github.com/apache/datafusion/blob/main/datafusion/expr/src/built_in_window_function.rs)
 for the up to date list of what remains
   
   The problem with having two different kinds of window functions is
   1. There are some features that may not be available to User Defined Window 
Functions that rely on built in
   2. Users can not easily choose which window functions to include or override 
the behavior if they need something different
   
   ### Describe the solution you'd like
   
   I would like to remove the "built in" version of this function and convert 
it to a user defined function
   
   ### Describe alternatives you've considered
   
   At a high level the process is:
   1. Add a new 
[WindowUDFImpl](https://docs.rs/datafusion/latest/datafusion/logical_expr/trait.WindowUDFImpl.html)
 in the 
[`functions-window`](https://github.com/apache/datafusion/tree/main/datafusion/functions-window)
 crate
   2. Port the code from the relevant existing implementation of the the built 
in functions in 
[datafusion/physical-expr/src/window](https://github.com/apache/datafusion/tree/main/datafusion/physical-expr/src/window)
   3. Remove the `BuiltInWindowFunction` variant and then get everything to 
compile (the compiler will show you where the existing implementations are)
   
   ### Additional context
   
   Here are some good examples:
   * @jcsherin  ported `RowNumber` in 
https://github.com/apache/datafusion/pull/12030


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to