-
Notifications
You must be signed in to change notification settings - Fork 915
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
Accept r-value references in convert_table_for_return(): #10131
Accept r-value references in convert_table_for_return(): #10131
Conversation
`cudf::jni::convert_table_for_return()` is usually used on tables returned from a libcudf API call. It currently requires an l-value reference for its table argument. This necessitates parking the result of libcudf call in an avoidable temp variable. This commit adds the option to use an r-value reference. This allows table expressions to be used directly, reducing clutter. Note: 1. The previous signature is retained, because not all call sites can use the r-value interface cleanly. (E.g. when the libcudf call is complex.) 2. The third argument (vector<unique_ptr<column>>) has been converted from l-ref to r-ref, so that an empty default can be introduced. This commit also includes minor code cleanup in the periphery of calls to `convert_table_for_return()`. Call it collateral damage.
Added/Fixed jpointerArray::begin()/end() signatures.
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #10131 +/- ##
================================================
+ Coverage 10.37% 10.43% +0.05%
================================================
Files 119 119
Lines 20149 20594 +445
================================================
+ Hits 2091 2148 +57
- Misses 18058 18446 +388
Continue to review full report at Codecov.
|
One more follow-up remains: To use |
Resolved merge conflicts. This will be checked in after the CI completes. |
Rerun tests |
@gpucibot merge |
This has now been merged. Thanks for the reviews, @jlowe. I'll have to delay the remaining follow up till next week. |
cudf::jni::convert_table_for_return()
is usually used on tables returned from a libcudf API call.It currently requires an l-value reference for its table argument. This necessitates parking the result of libcudf call in an avoidable temp variable.
This commit adds the option to use an r-value reference. This allows table expressions to be used directly, reducing clutter.
Note:
interface cleanly. (E.g. when the libcudf call is complex.)
so that an empty default can be introduced.
This commit also includes minor code cleanup in the periphery of calls to
convert_table_for_return()
.