| 178 | } |
| 179 | |
| 180 | inline Status ValidateShape(const std::vector<int64_t>& shape) const override { |
| 181 | ARROW_RETURN_NOT_OK(SparseIndex::ValidateShape(shape)); |
| 182 | |
| 183 | if (static_cast<size_t>(coords_->shape()[1]) == shape.size()) { |
| 184 | return Status::OK(); |
| 185 | } |
| 186 | |
| 187 | return Status::Invalid( |
| 188 | "shape length is inconsistent with the coords matrix in COO index"); |
| 189 | } |
| 190 | |
| 191 | protected: |
| 192 | std::shared_ptr<Tensor> coords_; |
no test coverage detected