Constructor with all attributes
| 426 | |
| 427 | // Constructor with all attributes |
| 428 | SparseTensor::SparseTensor(const std::shared_ptr<DataType>& type, |
| 429 | const std::shared_ptr<Buffer>& data, |
| 430 | const std::vector<int64_t>& shape, |
| 431 | const std::shared_ptr<SparseIndex>& sparse_index, |
| 432 | const std::vector<std::string>& dim_names) |
| 433 | : type_(type), |
| 434 | data_(data), |
| 435 | shape_(shape), |
| 436 | sparse_index_(sparse_index), |
| 437 | dim_names_(dim_names) { |
| 438 | ARROW_CHECK(is_tensor_supported(type->id())); |
| 439 | } |
| 440 | |
| 441 | const std::string& SparseTensor::dim_name(int i) const { |
| 442 | static const std::string kEmpty = ""; |
nothing calls this directly
no test coverage detected