You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/05/11 12:26:36 UTC
[GitHub] [arrow-datafusion] alamb opened a new issue, #6338: Document Window functions
alamb opened a new issue, #6338:
URL: https://github.com/apache/arrow-datafusion/issues/6338
### Is your feature request related to a problem or challenge?
@mustafasrepo and others have contributed to a sophisticated window function implementation in DataFusion like
```sql
select x, lag(x, 1) OVER (partition by y, order by x) FROM foo
```
However, the user guide https://arrow.apache.org/datafusion/user-guide/sql/index.html does not appear to mention this
### Describe the solution you'd like
1. Note in the user guide that DataFusion supports window functions
2. Add a new page for WindowFunctions
Note the docs (and instructions) are in https://github.com/apache/arrow-datafusion/tree/main/docs
The list of window functions is the normal aggregate functions as well as https://docs.rs/datafusion-expr/24.0.0/datafusion_expr/window_function/enum.BuiltInWindowFunction.html
https://docs.rs/datafusion-expr/24.0.0/datafusion_expr/window_function/enum.WindowFunction.html
### Describe alternatives you've considered
_No response_
### Additional context
_No response_
--
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] toppyy commented on issue #6338: Document Window functions
Posted by "toppyy (via GitHub)" <gi...@apache.org>.
toppyy commented on issue #6338:
URL: https://github.com/apache/arrow-datafusion/issues/6338#issuecomment-1555957322
started work on this!
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] toppyy commented on issue #6338: Document Window functions
Posted by "toppyy (via GitHub)" <gi...@apache.org>.
toppyy commented on issue #6338:
URL: https://github.com/apache/arrow-datafusion/issues/6338#issuecomment-1556097154
Made a draft PR.
The issue states that the PR should "_Note in the user guide that DataFusion supports window functions_". Any ideas where exactly to mention this? I had a look and I didn't find a place that felt suitable.
Also, I was on the fence about whether to describe the over-clause with each function as it seems repetative. The alternative would be to described the syntax for window functions on top of the page once in a general form (ie. something like `function(expr) over([partition by expr2] [order by expr3 [ asc | desc ][, …]])`). Any thoughts?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on issue #6338: Document Window functions
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6338:
URL: https://github.com/apache/arrow-datafusion/issues/6338#issuecomment-1557964412
Thanks @toppyy !
> The issue states that the PR should "Note in the user guide that DataFusion supports window functions". Any ideas where exactly to mention this? I had a look and I didn't find a place that felt suitable.
Perhaps we can add a new `Window Functions` page, following the model of `Aggregate Functions`?
<img width="1299" alt="Screenshot 2023-05-22 at 4 42 29 PM" src="https://github.com/apache/arrow-datafusion/assets/490673/d0b05f08-4ff1-42c8-96b8-d94155460761">
> Also, I was on the fence about whether to describe the over-clause with each function as it seems repetative. The alternative would be to described the syntax for window functions on top of the page once in a general form (ie. something like function(expr) over([partition by expr2] [order by expr3 [ asc | desc ][, …]])). Any thoughts?
I think describing the OVER clause once in general rather than for each function makes much more sense.
Perhaps we can take inspiration (and/or some of the text) from the postgres description: https://www.postgresql.org/docs/current/tutorial-window.html
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb closed issue #6338: Document Window functions
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb closed issue #6338: Document Window functions
URL: https://github.com/apache/arrow-datafusion/issues/6338
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org