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

Method non_empty_domain_var

tiledb/sm/cpp_api/array.h:909–936  ·  view source on GitHub ↗

* Retrieves the non-empty domain from the array on the given dimension. * This is the union of the non-empty domains of the array fragments. * Applicable only to var-sized dimensions. * * **Example:** * @code{.cpp} * tiledb::Context ctx; * tiledb::Array array(ctx, "s3://bucket-name/array-name", TILEDB_READ); * // Specify the dimension type (example uint32_t) * auto non_e

Source from the content-addressed store, hash-verified

907 * on the input dimension.
908 */
909 std::pair<std::string, std::string> non_empty_domain_var(unsigned idx) {
910 auto dim = schema_.domain().dimension(idx);
911 impl::type_check<char>(dim.type());
912 std::pair<std::string, std::string> ret;
913
914 // Get range sizes
915 uint64_t start_size, end_size;
916 int empty;
917 auto& ctx = ctx_.get();
918 ctx.handle_error(tiledb_array_get_non_empty_domain_var_size_from_index(
919 ctx.ptr().get(), array_.get(), idx, &start_size, &end_size, &empty));
920
921 if (empty)
922 return ret;
923
924 // Get ranges
925 ret.first.resize(start_size);
926 ret.second.resize(end_size);
927 ctx.handle_error(tiledb_array_get_non_empty_domain_var_from_index(
928 ctx.ptr().get(),
929 array_.get(),
930 idx,
931 &(ret.first[0]),
932 &(ret.second[0]),
933 &empty));
934
935 return ret;
936 }
937
938 /**
939 * Retrieves the non-empty domain from the array on the given dimension.

Calls 12

handle_errorMethod · 0.80
c_strMethod · 0.80
dimensionMethod · 0.45
domainMethod · 0.45
typeMethod · 0.45
getMethod · 0.45
ptrMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected