| 2487 | } |
| 2488 | |
| 2489 | Status CheckSparseTensorBodyBufferCount(const IpcPayload& payload, |
| 2490 | SparseTensorFormat::type sparse_tensor_format_id, |
| 2491 | const size_t ndim) { |
| 2492 | size_t expected_body_buffer_count = 0; |
| 2493 | ARROW_ASSIGN_OR_RAISE(expected_body_buffer_count, |
| 2494 | GetSparseTensorBodyBufferCount(sparse_tensor_format_id, ndim)); |
| 2495 | if (payload.body_buffers.size() != expected_body_buffer_count) { |
| 2496 | return Status::Invalid("Invalid body buffer count for a sparse tensor"); |
| 2497 | } |
| 2498 | |
| 2499 | return Status::OK(); |
| 2500 | } |
| 2501 | |
| 2502 | } // namespace |
| 2503 |
no test coverage detected