Commit 3f422a1
authored
feat: Support
* 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 commentFILTER clause in aggregate window functions (#17378)1 parent f70ded5 commit 3f422a1
File tree
34 files changed
+619
-116
lines changed- datafusion-examples/examples
- datafusion
- common/src
- core
- src
- tests
- dataframe
- fuzz_cases
- physical_optimizer
- expr/src
- logical_plan
- functions-window/src
- optimizer/src/analyzer
- physical-expr/src/window
- physical-plan/src/windows
- proto
- src
- logical_plan
- physical_plan
- tests/cases
- sqllogictest/test_files
- sql
- src
- expr
- unparser
- tests/cases
- substrait/src/logical_plan
- consumer/expr
- producer/expr
- dev
- docs/source/user-guide/sql
34 files changed
+619
-116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
| 203 | + | |
203 | 204 | | |
204 | 205 | | |
205 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
993 | 1035 | | |
994 | 1036 | | |
995 | 1037 | | |
| |||
1065 | 1107 | | |
1066 | 1108 | | |
1067 | 1109 | | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1068 | 1131 | | |
1069 | 1132 | | |
1070 | 1133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1650 | 1650 | | |
1651 | 1651 | | |
1652 | 1652 | | |
| 1653 | + | |
1653 | 1654 | | |
1654 | 1655 | | |
1655 | 1656 | | |
| |||
1669 | 1670 | | |
1670 | 1671 | | |
1671 | 1672 | | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1672 | 1678 | | |
1673 | 1679 | | |
1674 | 1680 | | |
| |||
1679 | 1685 | | |
1680 | 1686 | | |
1681 | 1687 | | |
| 1688 | + | |
1682 | 1689 | | |
1683 | 1690 | | |
1684 | 1691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
| 1002 | + | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
962 | 1039 | | |
963 | 1040 | | |
964 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
292 | 293 | | |
293 | 294 | | |
294 | 295 | | |
| |||
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
| 666 | + | |
665 | 667 | | |
666 | 668 | | |
667 | 669 | | |
| |||
681 | 683 | | |
682 | 684 | | |
683 | 685 | | |
| 686 | + | |
684 | 687 | | |
685 | 688 | | |
686 | 689 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3686 | 3686 | | |
3687 | 3687 | | |
3688 | 3688 | | |
| 3689 | + | |
3689 | 3690 | | |
3690 | 3691 | | |
3691 | 3692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
1233 | 1235 | | |
1234 | 1236 | | |
1235 | 1237 | | |
| |||
1247 | 1249 | | |
1248 | 1250 | | |
1249 | 1251 | | |
| 1252 | + | |
1250 | 1253 | | |
1251 | 1254 | | |
1252 | 1255 | | |
| |||
2388 | 2391 | | |
2389 | 2392 | | |
2390 | 2393 | | |
| 2394 | + | |
2391 | 2395 | | |
2392 | 2396 | | |
2393 | 2397 | | |
| |||
2400 | 2404 | | |
2401 | 2405 | | |
2402 | 2406 | | |
| 2407 | + | |
2403 | 2408 | | |
2404 | 2409 | | |
2405 | 2410 | | |
2406 | 2411 | | |
2407 | 2412 | | |
2408 | 2413 | | |
2409 | 2414 | | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
2410 | 2420 | | |
2411 | 2421 | | |
2412 | 2422 | | |
| |||
2658 | 2668 | | |
2659 | 2669 | | |
2660 | 2670 | | |
| 2671 | + | |
2661 | 2672 | | |
2662 | 2673 | | |
2663 | 2674 | | |
2664 | 2675 | | |
2665 | 2676 | | |
2666 | 2677 | | |
| 2678 | + | |
2667 | 2679 | | |
2668 | 2680 | | |
2669 | 2681 | | |
| |||
2967 | 2979 | | |
2968 | 2980 | | |
2969 | 2981 | | |
| 2982 | + | |
2970 | 2983 | | |
2971 | 2984 | | |
2972 | 2985 | | |
| |||
2993 | 3006 | | |
2994 | 3007 | | |
2995 | 3008 | | |
| 3009 | + | |
| 3010 | + | |
| 3011 | + | |
| 3012 | + | |
2996 | 3013 | | |
2997 | 3014 | | |
2998 | 3015 | | |
| |||
3370 | 3387 | | |
3371 | 3388 | | |
3372 | 3389 | | |
| 3390 | + | |
3373 | 3391 | | |
3374 | 3392 | | |
3375 | 3393 | | |
| |||
3380 | 3398 | | |
3381 | 3399 | | |
3382 | 3400 | | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
3383 | 3405 | | |
3384 | 3406 | | |
3385 | 3407 | | |
| |||
0 commit comments