[
https://issues.apache.org/jira/browse/ARROW-11872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Antoine Pitrou resolved ARROW-11872.
------------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Issue resolved by pull request 9640
[https://github.com/apache/arrow/pull/9640]
> Array Validation of GPU buffers fails due to incorrect validation check
> -----------------------------------------------------------------------
>
> Key: ARROW-11872
> URL: https://issues.apache.org/jira/browse/ARROW-11872
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++, Python
> Affects Versions: 3.0.0
> Reporter: Prem Sagar Gali
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> Whenever we try to create an array or a Table from a GPU buffer we get the
> following Invalid missing values buffer error.
> {code:java}
> pyarrow/table.pxi:485: in pyarrow.lib.chunked_array
> ???
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ > ???
> E pyarrow.lib.ArrowInvalid: In chunk 0: Invalid: Missing values buffer in
> non-empty arraypyarrow/error.pxi:84: ArrowInvalid{code}
> This is because the GPU buffers aren't passing the following validation
> check:
> [https://github.com/apache/arrow/blob/7be266be98d08214ef4b3f067059b6e6a8a6e5c0/cpp/src/arrow/array/validate.cc#L183]
>
> But this has to be changed to something like:
> {code:java}
> static bool IsBufferValid(const ArrayData& data, int index)
> { return data.buffers[index] != nullptr && (data.buffers[index]->is_cpu() ?
> data.buffers[index]->data() != nullptr : true); }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)