| 2546 | } |
| 2547 | |
| 2548 | Status CheckSparseTensorBodyBufferCount(const IpcPayload& payload, |
| 2549 | SparseTensorFormat::type sparse_tensor_format_id, |
| 2550 | const size_t ndim) { |
| 2551 | size_t expected_body_buffer_count = 0; |
| 2552 | ARROW_ASSIGN_OR_RAISE(expected_body_buffer_count, |
| 2553 | GetSparseTensorBodyBufferCount(sparse_tensor_format_id, ndim)); |
| 2554 | if (payload.body_buffers.size() != expected_body_buffer_count) { |
| 2555 | return Status::Invalid("Invalid body buffer count for a sparse tensor"); |
| 2556 | } |
| 2557 | |
| 2558 | return Status::OK(); |
| 2559 | } |
| 2560 | |
| 2561 | } // namespace |
| 2562 |
no test coverage detected