Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert BuiltInWindowFunction::{Lead, Lag} to a user defined window function #12802

Open
1 of 2 tasks
Tracked by #8709
jcsherin opened this issue Oct 8, 2024 · 1 comment · May be fixed by #12857
Open
1 of 2 tasks
Tracked by #8709

Convert BuiltInWindowFunction::{Lead, Lag} to a user defined window function #12802

jcsherin opened this issue Oct 8, 2024 · 1 comment · May be fixed by #12857
Assignees
Labels
enhancement New feature or request

Comments

@jcsherin
Copy link
Contributor

jcsherin commented Oct 8, 2024

Is your feature request related to a problem or challenge?

Part of #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 -- see the current source for BuiltInWindowFunction 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 in the functions-window crate
  2. Port the code from the relevant existing implementation of the the built in functions in 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant