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

Fix has_null predicate for drop_list_duplicates on nested structs #10436

Merged
merged 4 commits into from
Mar 17, 2022

Conversation

sperlingxx
Copy link
Contributor

For now, get_indices_of_unique_entries_dispatch only checks the outest layer of structures to determine whether the column contains null or not. It leads to the omission of intra null structures.
In current,
[Struct(Struct(1, "a", valid)), Struct(Struct(1, "a", valid), Struct(Struct(2, "a", invalid), Struct(Struct(1, "b", invalid)] becomes
[Struct(Struct(1, "a", valid)), Struct(Struct(2, "a", invalid), Struct(Struct(1, "b", invalid)] after droping list duplicates even if null equality is EQUAL. However, it should be
[Struct(Struct(1, "a", valid)), Struct(Struct(2, "a", invalid)], because Struct(1, "a") and Struct(2, "a") are both invalid, despite they contain different elements.

Current PR is to fix above problem by checking all flattened coulumns for nulls.

@sperlingxx sperlingxx added bug Something isn't working 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. Spark Functionality that helps Spark RAPIDS non-breaking Non-breaking change labels Mar 15, 2022
@sperlingxx sperlingxx requested a review from ttnghia March 15, 2022 11:32
@sperlingxx sperlingxx requested a review from a team as a code owner March 15, 2022 11:32
@sperlingxx sperlingxx self-assigned this Mar 15, 2022
@sperlingxx sperlingxx requested a review from davidwendt March 15, 2022 11:32
@codecov
Copy link

codecov bot commented Mar 15, 2022

Codecov Report

Merging #10436 (917d20e) into branch-22.04 (4596244) will increase coverage by 0.04%.
The diff coverage is n/a.

@@               Coverage Diff                @@
##           branch-22.04   #10436      +/-   ##
================================================
+ Coverage         86.13%   86.18%   +0.04%     
================================================
  Files               139      139              
  Lines             22438    22470      +32     
================================================
+ Hits              19328    19365      +37     
+ Misses             3110     3105       -5     
Impacted Files Coverage Δ
...ython/dask_cudf/dask_cudf/io/tests/test_parquet.py 100.00% <0.00%> (ø)
python/cudf/cudf/core/tools/numeric.py 89.24% <0.00%> (+0.11%) ⬆️
python/cudf/cudf/core/column/string.py 88.39% <0.00%> (+0.12%) ⬆️
python/cudf/cudf/core/groupby/groupby.py 91.57% <0.00%> (+0.22%) ⬆️
python/cudf/cudf/core/column/numerical.py 95.28% <0.00%> (+0.29%) ⬆️
python/cudf/cudf/core/tools/datetimes.py 84.49% <0.00%> (+0.30%) ⬆️
python/cudf/cudf/core/column/lists.py 90.56% <0.00%> (+0.47%) ⬆️
python/dask_cudf/dask_cudf/backends.py 86.57% <0.00%> (+1.59%) ⬆️

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 4596244...917d20e. Read the comment docs.

{
using ColWrapper = cudf::test::fixed_width_column_wrapper<TypeParam, int32_t>;
auto constexpr XXX = int32_t{0}; // nulls at the parent structs column level
auto constexpr YYY = int32_t{0}; // nulls at the parent structs column level
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm struggling with the distinction between XXX and YYY here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidwendt Sorry, it is my blunder. They should be assigned with different values to create intra null structs with
children of different values.

sperlingxx and others added 2 commits March 16, 2022 10:20
Signed-off-by: sperlingxx <[email protected]>
@sperlingxx
Copy link
Contributor Author

@gpucibot rerun tests

1 similar comment
@sperlingxx
Copy link
Contributor Author

@gpucibot rerun tests

@sperlingxx
Copy link
Contributor Author

@gpucibot rerun tests

@sperlingxx
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 87180ce into rapidsai:branch-22.04 Mar 17, 2022
@sperlingxx sperlingxx deleted the fix_dedup_list_of_struct branch March 17, 2022 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team bug Something isn't working libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Spark Functionality that helps Spark RAPIDS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants