18 Commits

Author SHA1 Message Date
Geoffrey Claude 3f422a1746 feat: Support FILTER clause in aggregate window functions (#17378)
* feat: Support `FILTER` clause in aggregate window functions

* fix: Box `WindowFunction` in `ExprFuncKind` enum to reduce enum total size

As suggested by `clippy`:

```
warning: large size difference between variants
   --> datafusion/expr/src/expr_fn.rs:772:1
    |
772 | / pub enum ExprFuncKind {
773 | |     Aggregate(AggregateFunction),
    | |     ---------------------------- the second-largest variant contains at least 72 bytes
774 | |     Window(WindowFunction),
    | |     ---------------------- the largest variant contains at least 288 bytes
775 | | }
    | |_^ the entire enum is at least 288 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
    = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
    |
774 -     Window(WindowFunction),
774 +     Window(Box<WindowFunction>),
    |
```

* test: Add DataFrame API test for FILTER clause on aggregate window functions

* docs: Update aggregate and window function documentation with FILTER support

* docs: Link missing proto fields to github issue in TODO comment
2025-09-05 22:18:23 +10:00
Liam Bao cc78edc51e docs: Fix failing CI (#17041) 2025-08-05 10:51:18 +08:00
LB7666 eb2b8c07b2 fix error result in execute&pre_selection (#16930)
* fix error result in execute&pre_selection

* fix clippy

* Optimize implementation

* more efficiency impl

* fix CI
2025-08-04 15:44:09 -04:00
Peter Nguyen f4c5a63c6b Fix random extra bullet for 'Analytical Functions' (#17014) 2025-08-02 12:23:04 +08:00
Matt Matravers a078cd257d Fix window_functions docs formatting (#17005)
* Fix window_functions docs formatting

* Fix the source and make the docs consistent

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-08-01 12:47:52 -07:00
Andrew Lamb e3e7d50bf3 Add window function examples in code (#16102) 2025-05-19 13:24:44 -04:00
aditya singh rathore e74ae7d4c1 [Docs]: Added SQL example for all window functions (#16074)
* update window function

* pretier fix

* Update window_functions.md
2025-05-19 09:55:56 -04:00
aditya singh rathore 4ae0edea8e Bug fix : fix the bug in docs in 'cum_dist()' Example (#15618)
* add example for cum_dist

* add nth_val examples

* updated doc

* updated nth_value

* Update Nth_value

* Update nth_value.rs

* Update window_functions.md

* Update window_functions.md

* Update nth_value.rs

* Updated nth_value.rs

* fmt

* Update via ./dev/update_function_docs.sh

* Update cum_dist.rs

* Update datafusion/functions-window/src/cume_dist.rs

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>

* Updated docs

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-04-07 14:55:29 -04:00
aditya singh rathore 5167a89c67 Docs : Added Sql examples for window Functions : nth_val , etc (#15555)
* add example for cum_dist

* add nth_val examples

* updated doc

* updated nth_value

* Update Nth_value

* Update nth_value.rs

* Update window_functions.md

* Update window_functions.md

* Update nth_value.rs

* Updated nth_value.rs

* fmt

* Update via ./dev/update_function_docs.sh

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-04-05 07:07:50 -04:00
Dawei H. 3f900ac5e1 Test all examples from library-user-guide & user-guide docs (#14544)
* add mut annotation

* fix rust examples

* fix rust examples

* update

* fix first doctest

* fix first doctest

* fix more doctest

* fix more doctest

* fix more doctest

* adopt rustdoc syntax

* adopt rustdoc syntax

* adopt rustdoc syntax

* fix more doctest

* add missing imports

* final udtf

* reenable

* remove dep

* run prettier

* api-health

* update doc

* update doc

* temp fix

* fix doc

* fix async schema provider

* fix async schema provider

* fix doc

* fix doc

* reorder

* refactor

* s

* finish

* minor update

* add missing docs

* add deps (#3)

* fix doctest

* update doc

* fix doctest

* fix doctest

* tweak showkeys

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* update to use user_doc

* add rustdoc preprocessing

* fix dir

* revert to original doc

* add allocator

* mark type

* update

* fix doctest

* add doctest

* add doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* fix doctest

* prettier format

* revert change to datafusion-testing

* add apache header

* install cmake in setup-builder for ci workflow dependency

* taplo + fix snmalloc

* Update function docs

* preprocess user-guide

* Render examples as sql

* fix intro

* fix docs via script

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
2025-02-10 10:29:44 -05:00
Jonathan Chen 8a88fdcc23 update docs (#13395) 2024-11-13 11:24:42 -08:00
Jonathan Chen 132b232b88 Minor: Delete old cume_dist and percent_rank docs (#13137)
* Delete cume_dist and percent_rank docs

* fix docs
2024-10-28 07:36:18 -04:00
Jagdish Parihar 02b969381d Convert ntile builtIn function to UDWF (#13040)
* converting to ntile udwf

* updated the window functions documentation file

* wip: update the ntile udwf function

* fix the roundtrip_logical_plan.rs

* removed builtIn ntile function

* fixed field name issue

* fixing the return type of ntile udwf

* error if UInt64 conversion fails

* handling if null is found

* handling if value is zero or less than zero

* removed unused import

* updated prost.rs file

* removed dead code

* fixed clippy error

* added inner doc comment

* minor fixes and added roundtrip logical plan test

* removed parse_expr in ntile
2024-10-25 09:12:58 -04:00
Burak Şen 9e636d8fe9 [docs]: migrate lead/lag window function docs to new docs (#13095)
* added lead-lag docs

* deleted old
2024-10-24 16:28:13 -04:00
Andrew Lamb e0b807ba9c Improve description of function migration (#12743) 2024-10-09 19:32:15 -04:00
Andrew Lamb 7d36059958 Remove redundant aggregate/window/scalar function documentation (#12745)
* remove redundant aggregate documentation

* remove redundant window documentation

* remove rudundant scalar functions
2024-10-08 11:02:02 -04:00
Chih Wang ae88235617 Fix sphinx warnings (#9142)
* Fix 'Configuration Settings' link in write_options.md

* Fix multiple reference definition in scalar_functions.md

* Fix typo: 'contcat_ws' to 'concat_ws' in scalar_functions.md

* Add missing section 'array_contains' in scalar_functions.md

* Fix reference warnings in operators.md

* Remove unsupported syntax 'csv' from code blocks of adding-udfs.md

* Fix syntax tag in example-usage.md

* Change syntax tag of code blocks that contain multiple syntaxes of
cli.md

* Remove 'sql' syntax tags from code blocks

* Remove leading ❯ in sql code blocks
2024-02-09 16:01:26 -05:00
toppyy c768c9b234 User guide lists window functions (#6402)
* User guide lists window functions

* prettier

* examples include range/rows -clauses

* Descriptions from Postgres docs; syntax described

* Describe named windows; RANGE & GROUPS require ORDER BY
2023-05-29 07:18:01 -04:00