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] Invalid children check in mutable_column_device_view #3280

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
- PR #3265 Fix dangling pointer in `is_sorted`
- PR #3267 ORC writer: fix incorrect ByteRLE encoding of long literal runs
- PR #3274 ORC writer: fix integer RLEv2 mode2 unsigned base value encoding
- PR #3280 Invalid children check in mutable_column_device_view

# cuDF 0.10.0 (16 Oct 2019)

Expand Down
6 changes: 3 additions & 3 deletions cpp/src/column/column_device_view.cu
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ mutable_column_device_view::mutable_column_device_view( mutable_column_view sour
source.null_count(), source.offset()}
{
// TODO children may not be actually possible for mutable columns
CUDF_EXPECTS(source.num_children()>0, "Mutable columns with children are not currently supported.");
CUDF_EXPECTS(source.num_children()==0, "Mutable columns with children are not currently supported.");
}

mutable_column_device_view::mutable_column_device_view( mutable_column_view source, ptrdiff_t h_ptr, ptrdiff_t d_ptr )
Expand All @@ -120,7 +120,7 @@ mutable_column_device_view::mutable_column_device_view( mutable_column_view sour
source.null_count(), source.offset()}
{
// TODO children may not be actually possible for mutable columns
CUDF_EXPECTS(source.num_children()>0, "Mutable columns with children are not currently supported.");
CUDF_EXPECTS(source.num_children()==0, "Mutable columns with children are not currently supported.");
}

// Handle freeing children
Expand All @@ -133,7 +133,7 @@ void mutable_column_device_view::destroy() {
std::unique_ptr<mutable_column_device_view, std::function<void(mutable_column_device_view*)>>
mutable_column_device_view::create(mutable_column_view source, cudaStream_t stream) {
// TODO children may not be actually possible for mutable columns
CUDF_EXPECTS(source.num_children()>0, "Mutable columns with children are not currently supported.");
CUDF_EXPECTS(source.num_children()==0, "Mutable columns with children are not currently supported.");
auto deleter = [](mutable_column_device_view* v) { v->destroy(); };
std::unique_ptr<mutable_column_device_view, decltype(deleter)> p{
new mutable_column_device_view(source), deleter};
Expand Down