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

Method result_buffer_elements_nullable

tiledb/sm/cpp_api/query.h:465–490  ·  view source on GitHub ↗

* Returns the number of elements in the result buffers from a read query. * This is a map from the attribute name to a tuple of values. * * The first is number of elements (offsets) for var size attributes, and the * second is number of elements in the data buffer. For fixed sized attributes * (and coordinates), the first is always 0. The third element is the size of * the validi

Source from the content-addressed store, hash-verified

463 * @endcode
464 */
465 std::unordered_map<std::string, std::tuple<uint64_t, uint64_t, uint64_t>>
466 result_buffer_elements_nullable() const {
467 std::unordered_map<std::string, std::tuple<uint64_t, uint64_t, uint64_t>>
468 elements;
469 if (buff_sizes_.empty())
470 return std::unordered_map<
471 std::string,
472 std::tuple<uint64_t, uint64_t, uint64_t>>(); // Query hasn't been
473 // submitted
474 for (const auto& b_it : buff_sizes_) {
475 auto attr_name = b_it.first;
476 auto size_tuple = b_it.second;
477 auto element_size = element_sizes_.find(attr_name)->second;
478 elements[attr_name] = field_var_sized(attr_name) ?
479 std::tuple<uint64_t, uint64_t, uint64_t>(
480 std::get<0>(size_tuple) / sizeof(uint64_t),
481 std::get<1>(size_tuple) / element_size,
482 std::get<2>(size_tuple) / sizeof(uint8_t)) :
483 std::tuple<uint64_t, uint64_t, uint64_t>(
484 0,
485 std::get<1>(size_tuple) / element_size,
486 std::get<2>(size_tuple) / sizeof(uint8_t));
487 }
488
489 return elements;
490 }
491
492 /**
493 * Retrieves the estimated result size for a fixed-size attribute.

Calls 1

emptyMethod · 0.45

Tested by 3

test_for_column_sizeFunction · 0.64
validate_dataMethod · 0.64
validate_data_varMethod · 0.64