-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use cudf::lists::distinct
in Java binding
#11233
Use cudf::lists::distinct
in Java binding
#11233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work!
One minor documentation rephrasing requested. Plus, we've relaxed the requirement for non-sliced input columns; we should add a test to confirm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@gpucibot merge |
This PR completely removes `cudf::lists::drop_list_duplicates`. It is replaced by the new API `cudf::list::distinct` which has a simpler implementation but better performance. The replacements for internal cudf usage have all been merged before thus there is no side effect or breaking for the existing APIs in this work. Closes #11114, #11093, #11053, #11034, and closes #9257. Depends on: * #11228 * #11149 * #11234 * #11233 Authors: - Nghia Truong (https://github.com/ttnghia) Approvers: - Jordan Jacobelli (https://github.com/Ethyling) - Robert Maynard (https://github.com/robertmaynard) - Vukasin Milovanovic (https://github.com/vuule) - Bradley Dice (https://github.com/bdice) URL: #11236
Java binding has
dropListDuplicates
anddropListDuplicatesWithKeysValues
APIs to create lists column having distinct list elements. Previously they have been implemented by calling tocudf::lists::drop_list_duplicates
, which relies on stably sorting the input lists column to extract unique list elements.This PR makes the following changes:
dropListDuplicates
to usecudf::lists::distinct
, which hasO(n)
time complexity, andcudf::jni::lists_distinct_by_key
sodropListDuplicatesWithKeysValues
will call it instead ofcudf::lists::drop_list_duplicates
. This function with keys-values pair input is only needed by Spark'screate_map
function so its implementation will be kept inside the JNI layer instead of in libcudf.