timsaucer opened a new pull request, #871:
URL: https://github.com/apache/datafusion-python/pull/871

   *Note* Marking as draft until 
https://github.com/apache/datafusion-python/pull/867 merges, after which I will 
rebase and mark read.
   
   # Which issue does this PR close?
   
   Closes #865 
   
    # Rationale for this change
   
   This function allows the user to turn any aggregate function into a window 
function. Previously using aggregates as windows was only expressed through 
`functions.window()` which took the aggregate's name. This only supports built 
in window functions or functions that have been registered with the session 
context. While this worked, it's a bit of an anti-pattern for people who don't 
need to register functions into the session context.
   
   # What changes are included in this PR?
   
   Adds `.over()` to an expression which indicates it is to be used as a window 
function.
   
   # Are there any user-facing changes?
   
   During testing I noticed that the default window frames for `f.window()` are 
set to unbounded preceeding to unbounded following. With `.over()` it uses the 
default frames, so if ordering is set it goes from unbounded preceeding to 
current row. This *does* match user expectation.


-- 
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