-
Notifications
You must be signed in to change notification settings - Fork 3.7k
GH-46578: [C++][Statistics] Fix the ownership handling of arrow::ArrayData::statistics in arrow::ArrayData::CopyTo and arrow::ArrayDataViewOrCopy #46625
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
base: main
Are you sure you want to change the base?
Conversation
|
@kou 1-While I’ve tried to follow the project’s coding guidelines, my primary goal was to provide an initial solution quickly to facilitate further discussion. Let’s first focus on whether the proposed solution is correct. Once we agree on that, we can refine the code structure. If anything is unclear in the code, please let me know—I’ll be happy to clarify it. 2-Currently, there are no existing tests for |
@kou arrow/cpp/src/arrow/gpu/cuda_test.cc Lines 1229 to 1232 in 96e68ef
2-My solution might be incorrect on GPUs that do not support device attribute cudaDevAttrCanUseHostPointerForRegisteredMem, as noted in the code below. arrow/cpp/src/arrow/gpu/cuda_test.cc Lines 1070 to 1072 in 96e68ef
Would it be possible to modify Lines 143 to 150 in b3e4d22
|
@kou arrow/cpp/src/arrow/gpu/cuda_test.cc Lines 1059 to 1068 in 96e68ef
2- The question is located in the comment below. arrow/cpp/src/arrow/gpu/cuda_test.cc Lines 1149 to 1160 in 96e68ef
3- The result of the following expression is false: my_cuda_mm_->AllocateBuffer(10).ValueOrDie()->memory_manager() == my_cuda_mm_ 3.1- Is this the expected behavior? 3.2- If the answer is no, should we consider the above line a bug? arrow/cpp/src/arrow/gpu/cuda_test.cc Lines 1169 to 1172 in 96e68ef
4- arrow::CudaHostBuffer::FromVector and arrow::CudaBuffer::FromVector both call the following lines, which do not produce either a arrow::CudaHostBuffer or a CudaBuffer . Should this be considered a bug?Lines 162 to 180 in b3e4d22
|
b3e4d22
to
96e68ef
Compare
Sorry for not responding this topic. I don't have enough time to consider this topic. I think that we can always share with both of
But |
Rationale for this change
Fix the ownership management of
arrow::ArrayStatistics
withinarrow::ArrayData::ViewOrCopyTo
.What changes are included in this PR?
Correct ownership handling of
arrow::ArrayStatistics
inarrow::ArrayData::ViewOrCopyTo.
Add tests to verify whether
arrow::ArrayData::statistics
is shared or copied as expected.Are these changes tested?
Yes, I run the relevant unit tests.
Are there any user-facing changes?
No