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

[REVIEW] Adding support for is_null and is_not_null #2962

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7c57700
function and test cases
rgsl888prabhu Oct 3, 2019
4370fc8
change log
rgsl888prabhu Oct 3, 2019
d6e8cbc
review changes
rgsl888prabhu Oct 4, 2019
6ee6722
Merge pull request #20 from rapidsai/branch-0.11
rgsl888prabhu Oct 4, 2019
7641cdc
Merge branch '2143_is_null_and_is_not_null' of https://github.com/rgs…
rgsl888prabhu Oct 4, 2019
2afe671
cython support
rgsl888prabhu Oct 4, 2019
fac1144
review changes and updating isna and notna definition for series
rgsl888prabhu Oct 7, 2019
ee0a03d
Merge pull request #24 from rapidsai/branch-0.11
rgsl888prabhu Oct 7, 2019
2fd920e
Addressing reviews
rgsl888prabhu Oct 8, 2019
01224f3
Merge branch '2143_is_null_and_is_not_null' of https://github.com/rgs…
rgsl888prabhu Oct 8, 2019
612b763
pleasing black
rgsl888prabhu Oct 8, 2019
6563647
Delete global.lock
rgsl888prabhu Oct 8, 2019
7a180ba
Delete purge.lock
rgsl888prabhu Oct 8, 2019
382fd5b
Update CHANGELOG.md
rgsl888prabhu Oct 10, 2019
840547f
Merge branch 'branch-0.11' into 2143_is_null_and_is_not_null
rgsl888prabhu Oct 10, 2019
c71aa4b
Merge branch 'branch-0.11' into 2143_is_null_and_is_not_null
rgsl888prabhu Oct 10, 2019
8423499
removing gpu_isnull gpu_notna notna_mask
rgsl888prabhu Oct 11, 2019
0074137
Merge pull request #32 from rapidsai/branch-0.11
rgsl888prabhu Oct 15, 2019
787d917
merging with branch 0.11
rgsl888prabhu Oct 16, 2019
c6ad279
Merge branch 'branch-0.11' into 2143_is_null_and_is_not_null
Oct 17, 2019
166416f
review changes
rgsl888prabhu Oct 17, 2019
da0f7a9
flake
rgsl888prabhu Oct 17, 2019
d534d60
Merge branch 'branch-0.11' into 2143_is_null_and_is_not_null
rgsl888prabhu Oct 17, 2019
4d05511
Merge branch 'branch-0.11' into 2143_is_null_and_is_not_null
harrism Oct 17, 2019
6d85384
review changes
rgsl888prabhu Oct 18, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cpp/tests/unary/unary_ops_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2427,7 +2427,7 @@ TYPED_TEST(IsNull, sample)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 5000;
cudf::size_type NUM_ELEM = 5000;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2445,7 +2445,7 @@ TYPED_TEST(IsNull, all_valid)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 50;
cudf::size_type NUM_ELEM = 50;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2463,7 +2463,7 @@ TYPED_TEST(IsNull, all_invalid)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 50;
cudf::size_type NUM_ELEM = 50;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2481,7 +2481,7 @@ TYPED_TEST(IsNull, empty_column)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 0;
cudf::size_type NUM_ELEM = 0;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2508,7 +2508,7 @@ TYPED_TEST(IsNotNull, sample)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 5000;
cudf::size_type NUM_ELEM = 5000;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2526,7 +2526,7 @@ TYPED_TEST(IsNotNull, all_valid)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 50;
cudf::size_type NUM_ELEM = 50;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2544,7 +2544,7 @@ TYPED_TEST(IsNotNull, all_invalid)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 50;
cudf::size_type NUM_ELEM = 50;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand All @@ -2562,7 +2562,7 @@ TYPED_TEST(IsNotNull, empty_column)
{
using T = TypeParam;

gdf_index_type NUM_ELEM = 0;
cudf::size_type NUM_ELEM = 0;

column_wrapper <T> col(NUM_ELEM,
[](auto row) { return row; },
Expand Down
4 changes: 4 additions & 0 deletions python/cudf/cudf/_lib/unaryops.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ def nans_to_nulls(py_col):
finalizer=rmm._make_finalizer(mask_ptr, 0)
)

free_column(c_col)

return mask


Expand All @@ -176,6 +178,7 @@ def is_null(col):
cdef gdf_column* c_col = column_view_from_column(col)
rgsl888prabhu marked this conversation as resolved.
Show resolved Hide resolved

cdef gdf_column result = cpp_unaryops.is_null(c_col[0])
free_column(c_col)

return gdf_column_to_column(&result)

Expand All @@ -188,5 +191,6 @@ def is_not_null(col):
cdef gdf_column* c_col = column_view_from_column(col)
rgsl888prabhu marked this conversation as resolved.
Show resolved Hide resolved

cdef gdf_column result = cpp_unaryops.is_not_null(c_col[0])
free_column(c_col)

return gdf_column_to_column(&result)
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def isnull(self):
"""
from cudf.core.series import Series

return Series(self.as_column().isnull(), name=self.name)
return GenericIndex(self.as_column().isnull(), name=self.name)
rgsl888prabhu marked this conversation as resolved.
Show resolved Hide resolved

def isna(self):
"""Identify missing values in an Index. Alias for isnull.
Expand All @@ -310,7 +310,7 @@ def notna(self):
"""
from cudf.core.series import Series

return Series(self.as_column().notna(), name=self.name)
return GenericIndex(self.as_column().notna(), name=self.name)
rgsl888prabhu marked this conversation as resolved.
Show resolved Hide resolved

def notnull(self):
"""Identify non-missing values in an Index. Alias for notna.
Expand Down