JNI bindings for NTH_ELEMENT window aggregation#11201
JNI bindings for NTH_ELEMENT window aggregation#11201rapids-bot[bot] merged 15 commits intorapidsai:branch-22.08from
Conversation
This is to address spark-rapids/issues/4005 and spark-rapids/issues/5061. This change adds support for `NTH_ELEMENT` window aggregations. This should allow for the implementation of `FIRST()`, `LAST()`, and `NTH_VALUE()` window functions in Spark SQL. `NTH_ELEMENT` in window function returns the Nth element from the specified window for each row in a column. `N` is deemed to be zero based, so `NTH_ELEMENT(0)` translates to the first element in a window. Similarly, `NTH_ELEMENT(-1)` translates to the last. If for any window of size `W`, if the specified `N` falls outside the range `[ -W, W-1 ]`, a null element is returned for that row.
More readable.
This commit adds the JNI bindings required to invoke `NTH_ELEMENT` aggregations as a window aggregation. Java tests are included. Depends on rapidsai#11158.
Codecov Report
@@ Coverage Diff @@
## branch-22.08 #11201 +/- ##
===============================================
Coverage ? 86.30%
===============================================
Files ? 144
Lines ? 22698
Branches ? 0
===============================================
Hits ? 19589
Misses ? 3109
Partials ? 0 Continue to review full report at Codecov.
|
1. Using #pragma once. 2. Doxygen format. 3. Renamed gather map functor. 4. Materialized gather indices.
|
Setting |
rwlee
left a comment
There was a problem hiding this comment.
LGTM pending dependency being merged. 1 formatting/whitespace nit
Also, switched to use gathered.front().
|
@razajafri, @rwlee, I have addressed your concerns. I'd appreciate it if you could take another gander. |
|
@gpucibot merge |
|
Thank you for the reviews, @rwlee, @razajafri. |
Depends on #11158.
This commit adds the JNI bindings required to invoke
NTH_ELEMENTaggregations as a window aggregation. Java tests are included.