Describe the bug
Note that mutable_column_device_view does in fact have a method for accessing child columns:
|
/**---------------------------------------------------------------------------* |
|
* @brief Returns the specified child |
|
* |
|
* @param child_index The index of the desired child |
|
* @return column_view The requested child `column_view` |
|
*---------------------------------------------------------------------------**/ |
|
__device__ mutable_column_device_view& child(size_type child_index) const |
|
noexcept { |
|
return mutable_children[child_index]; |
|
} |
However, the constructors and create method for mutable_column_device_view have TODO comments about child columns not being supported, but there isn't actually any error checking to handle this case. So, if you attempt to access the children using the above method, it results in a cudaIllegalMemoryAccess with no indication why or where it is failing.
|
// Construct a unique_ptr that invokes `destroy()` as it's deleter |
|
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 |
|
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}; |
|
return p; |
|
} |
|
// For use with inplace-new to pre-fill memory to be copied to device |
|
mutable_column_device_view::mutable_column_device_view( mutable_column_view source ) |
|
: detail::column_device_view_base{source.type(), source.size(), |
|
source.head(), source.null_mask(), |
|
source.null_count(), source.offset()} |
|
{ |
|
// TODO children may not be actually possible for mutable columns |
|
} |
|
|
|
mutable_column_device_view::mutable_column_device_view( mutable_column_view source, ptrdiff_t h_ptr, ptrdiff_t d_ptr ) |
|
: detail::column_device_view_base{source.type(), source.size(), |
|
source.head(), source.null_mask(), |
|
source.null_count(), source.offset()} |
|
{ |
|
// TODO children may not be actually possible for mutable columns |
|
} |
Expected behavior
If child columns cannot be supported, the child method should be removed and the create and constructor methods should throw an exception when encountering child columns.
Describe the bug
Note that
mutable_column_device_viewdoes in fact have a method for accessing child columns:cudf/cpp/include/cudf/column/column_device_view.cuh
Lines 573 to 582 in e174716
However, the constructors and create method for
mutable_column_device_viewhave TODO comments about child columns not being supported, but there isn't actually any error checking to handle this case. So, if you attempt to access the children using the above method, it results in a cudaIllegalMemoryAccess with no indication why or where it is failing.cudf/cpp/src/column/column_device_view.cu
Lines 139 to 147 in e174716
cudf/cpp/src/column/column_device_view.cu
Lines 116 to 131 in e174716
Expected behavior
If child columns cannot be supported, the
childmethod should be removed and thecreateand constructor methods should throw an exception when encountering child columns.