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

Inconsistent default values for null equality and NaN equality #11329

Closed
bdice opened this issue Jul 22, 2022 · 5 comments · Fixed by #11621 or #11952
Closed

Inconsistent default values for null equality and NaN equality #11329

bdice opened this issue Jul 22, 2022 · 5 comments · Fixed by #11621 or #11952

Comments

@bdice
Copy link
Contributor

bdice commented Jul 22, 2022

In cudf::distinct, we default to equal nulls and equal NaNs. This aligns with the defaults of intersect_distinct, union_distinct, and difference_distinct in PR #11043 (as of this writing - not yet merged).

However, there are competing standards:

We should strive for a consistent set of defaults for how null and NaN equality are handled. I think I would recommend a change in make_collect_set_aggregation and drop_list_duplicates to align with the other functions mentioned above.

Originally posted by @bdice in #11043 (comment)

@bdice
Copy link
Contributor Author

bdice commented Jul 22, 2022

Partially resolved by #11236, which removes drop_list_duplicates.

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

@bdice
Copy link
Contributor Author

bdice commented Oct 20, 2022

I caught another place where nan_equality::UNEQUAL is being used in make_merge_sets_aggregation.

nan_equality nans_equal = nan_equality::UNEQUAL);

I will make a follow-up PR that can be merged after #11621.

@ttnghia
Copy link
Contributor

ttnghia commented Oct 20, 2022

How about renaming nan_equality::ALL_EQUAL to just EQUAL to match with null_equality?

rapids-bot bot pushed a commit that referenced this issue Oct 20, 2022
Partially resolves #11329. This helps to align our default behaviors for null and NaN equality across APIs, specifically for `make_collect_set_aggregation` in this PR. All functions should default to treating null values as equal to one another and NaN values as equal to one another.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - David Wendt (https://github.com/davidwendt)
  - Nghia Truong (https://github.com/ttnghia)

URL: #11621
@vyasr
Copy link
Contributor

vyasr commented Oct 20, 2022

Not quite done yet. @bdice be careful with the wording on your PRs :) GH sees "partially resolves X" as ".... resolves X" and still closes the issue AFAICT

@vyasr vyasr reopened this Oct 20, 2022
rapids-bot bot pushed a commit that referenced this issue Oct 21, 2022
Partially resolves #11329. This helps to align our default behaviors for null and NaN equality across APIs, specifically for `make_merge_sets_aggregation` in this PR. All functions should default to treating null values as equal to one another and NaN values as equal to one another.

Authors:
  - Bradley Dice (https://github.com/bdice)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - Vyas Ramasubramani (https://github.com/vyasr)
  - David Wendt (https://github.com/davidwendt)

URL: #11952
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants