| 128 | } |
| 129 | |
| 130 | std::string CppConsolidationPlanFx::write_sparse( |
| 131 | std::vector<int> a1, |
| 132 | std::vector<uint64_t> dim1, |
| 133 | std::vector<uint64_t> dim2, |
| 134 | uint64_t timestamp) { |
| 135 | // Open array. |
| 136 | std::unique_ptr<Array> array; |
| 137 | array = std::make_unique<Array>( |
| 138 | ctx_, |
| 139 | SPARSE_ARRAY_NAME, |
| 140 | TILEDB_WRITE, |
| 141 | TemporalPolicy(TimestampStartEnd, 0, timestamp)); |
| 142 | |
| 143 | // Create query. |
| 144 | Query query(ctx_, *array, TILEDB_WRITE); |
| 145 | query.set_layout(TILEDB_GLOBAL_ORDER); |
| 146 | query.set_data_buffer("a1", a1); |
| 147 | query.set_data_buffer("d1", dim1); |
| 148 | query.set_data_buffer("d2", dim2); |
| 149 | |
| 150 | // Submit/finalize the query. |
| 151 | query.submit(); |
| 152 | query.finalize(); |
| 153 | |
| 154 | // Close array. |
| 155 | array->close(); |
| 156 | |
| 157 | return tiledb::sm::URI(query.fragment_uri(0)).last_path_part(); |
| 158 | } |
| 159 | |
| 160 | void CppConsolidationPlanFx::remove_array(const std::string& array_name) { |
| 161 | if (!is_array(array_name)) |
nothing calls this directly
no test coverage detected