Commit c406ee0
authored
Support collect_set RESPECT NULLS [databricks] (#15372)
Fixes #15219.
### Description
- Added Spark 4.2 `collect_set RESPECT NULLS` support on GPU by plumbing
`ignoreNulls` through shims, expression metadata, GPU aggregate data
types, CPU buffer conversion, and cuDF null policy so GPU results
preserve one null like Spark CPU.
- Added Spark 4.2 group-by, global reduction, rolling-window, and fully
unbounded partitioned-window integration coverage for `collect_set
IGNORE NULLS` and `collect_set RESPECT NULLS` because the new SQL clause
changes null handling semantics.
- Validated the Spark 4.2 jars and focused integration tests with `mvn
-s ~/.m2/settings_art.xml -f scala2.13/pom.xml -Dbuildver=400
-Dcuda.version=cuda13 -DskipTests validate`, `mvn -s
~/.m2/settings_art.xml -Dbuildver=330 -Dcuda.version=cuda13 -DskipTests
validate`, `mvn -s ~/.m2/settings_art.xml -f scala2.13/pom.xml -pl dist
-am -Dbuildver=420 -Dcuda.version=cuda13 -DskipTests
-Dmaven.javadoc.skip=true package`,
`SPARK_HOME=/path/to/spark-4.2.0-bin-hadoop3
TESTS="hash_aggregate_test.py window_function_test.py"
TEST="test_hash_reduction_collect_set_respect_nulls or
test_window_aggs_for_rows_collect_set_respect_nulls" TEST_PARALLEL=0
./run_pyspark_from_build.sh`, and earlier focused coverage for group-by
and fully unbounded windows.
### Checklists
Documentation
- [ ] Updated for new or modified user-facing features or behaviors
- [x] No user-facing change
Testing
- [x] Added or modified tests to cover new code paths
- [ ] Covered by existing tests
(Please provide the names of the existing tests in the PR description.)
- [ ] Not required
Performance
- [ ] Tests ran and results are added in the PR description
- [ ] Issue filed with a link in the PR description
- [x] Not required
---------
Signed-off-by: Firestarman <firestarmanllc@gmail.com>1 parent f5f5ccb commit c406ee0
7 files changed
Lines changed: 203 additions & 24 deletions
File tree
- integration_tests/src/main/python
- sql-plugin/src/main
- scala
- com/nvidia/spark/rapids
- org/apache/spark/sql/rapids/aggregate
- spark330db/scala/com/nvidia/spark/rapids/shims
- spark330/scala/com/nvidia/spark/rapids/shims
- spark420/scala/com/nvidia/spark/rapids/shims
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
893 | 920 | | |
894 | 921 | | |
895 | 922 | | |
| |||
954 | 981 | | |
955 | 982 | | |
956 | 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 | + | |
957 | 1011 | | |
958 | 1012 | | |
959 | 1013 | | |
| |||
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2451 | 2451 | | |
2452 | 2452 | | |
2453 | 2453 | | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
| 2474 | + | |
| 2475 | + | |
| 2476 | + | |
| 2477 | + | |
| 2478 | + | |
| 2479 | + | |
| 2480 | + | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
2454 | 2507 | | |
2455 | 2508 | | |
2456 | 2509 | | |
| |||
2520 | 2573 | | |
2521 | 2574 | | |
2522 | 2575 | | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
| 2579 | + | |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | + | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
| 2600 | + | |
| 2601 | + | |
| 2602 | + | |
| 2603 | + | |
| 2604 | + | |
| 2605 | + | |
| 2606 | + | |
| 2607 | + | |
| 2608 | + | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
2523 | 2614 | | |
2524 | 2615 | | |
2525 | 2616 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3850 | 3850 | | |
3851 | 3851 | | |
3852 | 3852 | | |
3853 | | - | |
| 3853 | + | |
| 3854 | + | |
3854 | 3855 | | |
3855 | 3856 | | |
3856 | 3857 | | |
3857 | 3858 | | |
3858 | 3859 | | |
3859 | 3860 | | |
3860 | 3861 | | |
3861 | | - | |
| 3862 | + | |
| 3863 | + | |
3862 | 3864 | | |
3863 | 3865 | | |
3864 | 3866 | | |
| |||
Lines changed: 45 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | | - | |
| 133 | + | |
135 | 134 | | |
136 | 135 | | |
137 | | - | |
| 136 | + | |
138 | 137 | | |
139 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
1970 | 1989 | | |
1971 | 1990 | | |
1972 | 1991 | | |
1973 | | - | |
| 1992 | + | |
| 1993 | + | |
1974 | 1994 | | |
1975 | 1995 | | |
1976 | | - | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
1977 | 2003 | | |
1978 | 2004 | | |
1979 | 2005 | | |
| |||
1987 | 2013 | | |
1988 | 2014 | | |
1989 | 2015 | | |
1990 | | - | |
| 2016 | + | |
1991 | 2017 | | |
1992 | 2018 | | |
1993 | | - | |
| 2019 | + | |
1994 | 2020 | | |
1995 | 2021 | | |
1996 | 2022 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
0 commit comments