Skip to content
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

JNI: Function to copy and set validity from bool column. #9901

Merged
merged 3 commits into from
Dec 16, 2021

Conversation

mythrocks
Copy link
Contributor

This commit introduces a JNI function ColumnVector#copyWithValidity(ColumnView boolean_column) to use a BOOL8 column as the validity buffer of a column.

As per the convention in the JNI layer, this method does not modify the current object. A new ColumnVector is returned, containing the contents of the current object. The validity of the returned ColumnVector is set to the DeviceBuffer representation of the logical contents of the supplied BOOL8 column.

This method will be useful to set a column's validity based on a column resulting from a boolean operation.

@mythrocks mythrocks requested a review from a team as a code owner December 14, 2021 21:51
@mythrocks mythrocks self-assigned this Dec 14, 2021
@github-actions github-actions bot added CMake CMake build issue Java Affects Java cuDF API. labels Dec 14, 2021
@mythrocks mythrocks added feature request New feature or request non-breaking Non-breaking change labels Dec 14, 2021
java/src/main/java/ai/rapids/cudf/ColumnView.java Outdated Show resolved Hide resolved
java/src/main/java/ai/rapids/cudf/ColumnView.java Outdated Show resolved Hide resolved
java/src/main/native/src/ColumnViewJni.cpp Outdated Show resolved Hide resolved
java/src/main/native/src/ColumnViewJni.cu Show resolved Hide resolved
1. Renamed to `copyWithBooleanColumnAsValidity()`.
2. Better documentation on null handling in validity column, failure conditions, etc.
3. Removed redundant error checks.
@mythrocks mythrocks requested a review from jlowe December 15, 2021 20:16
@codecov
Copy link

codecov bot commented Dec 15, 2021

Codecov Report

Merging #9901 (020f878) into branch-22.02 (967a333) will decrease coverage by 0.08%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.02    #9901      +/-   ##
================================================
- Coverage         10.49%   10.40%   -0.09%     
================================================
  Files               119      119              
  Lines             20305    20503     +198     
================================================
+ Hits               2130     2134       +4     
- Misses            18175    18369     +194     
Impacted Files Coverage Δ
python/dask_cudf/dask_cudf/sorting.py 92.30% <0.00%> (-0.61%) ⬇️
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/frame.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/index.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/parquet.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/series.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/utils.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/dtypes.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/ioutils.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <0.00%> (ø)
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 335862b...020f878. Read the comment docs.

@mythrocks
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 19190b4 into rapidsai:branch-22.02 Dec 16, 2021
@mythrocks
Copy link
Contributor Author

Merged. Closing this PR out now. Thanks for the review, @jlowe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake build issue feature request New feature or request Java Affects Java cuDF API. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants