MCPcopy Create free account
hub / github.com/TileDB-Inc/TileDB / read_sparse

Method read_sparse

test/src/unit-cppapi-deletes.cc:264–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262}
263
264void DeletesFx::read_sparse(
265 std::vector<int>& a1,
266 std::vector<uint64_t>& dim1,
267 std::vector<uint64_t>& dim2,
268 std::string& stats,
269 tiledb_layout_t layout,
270 uint64_t timestamp,
271 bool encrypt) {
272 // Open array.
273 std::unique_ptr<Array> array;
274 if (encrypt) {
275 array = std::make_unique<Array>(
276 ctx_,
277 array_name_.c_str(),
278 TILEDB_READ,
279 TemporalPolicy(TimeTravel, timestamp),
280 EncryptionAlgorithm(AESGCM, key_.c_str()));
281 } else {
282 array = std::make_unique<Array>(
283 ctx_,
284 array_name_.c_str(),
285 TILEDB_READ,
286 TemporalPolicy(TimeTravel, timestamp));
287 }
288
289 // Create query.
290 Query query(ctx_, *array, TILEDB_READ);
291 query.set_layout(layout);
292 query.set_data_buffer("a1", a1);
293 query.set_data_buffer("d1", dim1);
294 query.set_data_buffer("d2", dim2);
295
296 // Submit the query.
297 query.submit();
298
299 CHECK(query.query_status() == Query::Status::COMPLETE);
300
301 // Get the query stats.
302 stats = query.stats();
303
304 // Close array.
305 array->close();
306}
307
308void DeletesFx::consolidate_sparse(bool vacuum) {
309 auto config = ctx_.config();

Callers

nothing calls this directly

Calls 9

TemporalPolicyClass · 0.85
EncryptionAlgorithmClass · 0.85
c_strMethod · 0.80
query_statusMethod · 0.80
set_layoutMethod · 0.45
set_data_bufferMethod · 0.45
submitMethod · 0.45
statsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected