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

Add shallow equality comparison for column_view #9187

Conversation

karthikeyann
Copy link
Contributor

Fixes #9139
Depends on PR #9185 (for unit tests only)
Use commit 88726a4 for code review.

Added shallow_equal(column_view, column_view)
Added unit tests

It compares two column_views based on the shallow states of column_view:
type, size, data pointer, null_mask pointer, offset, and the column_view of the children.
null_count is not used since it is a cached value and it may vary based on contents of null_mask, and may be pre-computed or not.

@karthikeyann karthikeyann added feature request New feature or request 3 - Ready for Review Ready for review by team libcudf Affects libcudf (C++/CUDA) code. 4 - Needs Review Waiting for reviewer to review or respond non-breaking Non-breaking change labels Sep 7, 2021
@karthikeyann karthikeyann requested a review from a team as a code owner September 7, 2021 20:09
@github-actions github-actions bot added the CMake CMake build issue label Sep 7, 2021
Comment on lines 101 to 103
return (lhs.type() == rhs.type()) and (lhs.size() == rhs.size()) and
(lhs.head() == rhs.head()) and (lhs.null_mask() == rhs.null_mask()) and
(lhs.offset() == rhs.offset()) and
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment here, we shouldn't include the header() or null_mask() when size() is 0.

@jrhemstad
Copy link
Contributor

I think this PR can be merged with #9185 into a single PR.

@karthikeyann
Copy link
Contributor Author

merged with PR #9185
closing this one.

@karthikeyann karthikeyann deleted the fea-shallow_equal_columnview branch September 17, 2021 05:15
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 4 - Needs Review Waiting for reviewer to review or respond CMake CMake build issue feature request New feature or request libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Provide shallow equality comparison for column_view
2 participants