-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
For many of the same reasons as listed on #8045, having two types of aggregate functions ("built in" --BuiltInWindowFunction and WindowUDF is problematic for two reasons:
- There are some features that may not be available to User Defined Window Functions (such as reversing
FIRST_VALUEandLAST_VALUE) - Users can not easily choose which window functions to include (which will likely be especially problematic as we work to add more functions)
Describe the solution you'd like
I propose moving DataFusion to only use WindowURFs and remove BuiltInWindowFunction for the same reasons as #8045
We will keep the existing WindowUDF interface as much as possible, while also potentially providing an easier way to define them.
Describe alternatives you've considered
Additional context
Proposed implementation steps:
- Implement trait based API for defining
WindowUDF#8711 - Clean internal implementation of WindowUDF to use WindowUDFImpl (rather than the function pointers) #8734
- Add a
WindowUDFImpl::simplfy()API #9527 - Convert built-in
row_numberto user-defined window function #12029 - Convert
nth_valueto UDAF #11287 - Add
fieldtrait method toWindowUDFImpl#12373 - Convert built-in
row_numberto user-defined window function #12030 - Convert
BuiltInWindowFunction::{Rank, PercentRank, DenseRank}to a user defined functions #12648 - Convert
BuiltInWindowFunction::{NthValue}to a user defined functions #12649 - Convert
BuiltInWindowFunction::Ntileto a user defined window function #12694 - Convert
BuiltInWindowFunction::CumeDistto a user defined window function #12695 - Convert
BuiltInWindowFunction::{Lead, Lag}to a user defined window function #12802
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request