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

Method get_max_memory_size

tiledb/sm/subarray/subarray.cc:1248–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1246}
1247
1248FieldDataSize Subarray::get_max_memory_size(
1249 const char* name, const Config* config, ThreadPool* compute_tp) {
1250 // Check attribute/dimension name
1251 if (name == nullptr) {
1252 throw SubarrayException(
1253 "Cannot get max memory size; field name cannot be null");
1254 }
1255
1256 // Check if name is attribute or dimension
1257 const auto& array_schema = array_->array_schema_latest();
1258 bool is_dim = array_schema.is_dim(name);
1259 bool is_attr = array_schema.is_attr(name);
1260
1261 // Check if attribute/dimension exists
1262 if (!ArraySchema::is_special_attribute(name) && !is_dim && !is_attr) {
1263 throw SubarrayException(
1264 std::string("Cannot get max memory size; ") +
1265 "there is no field named '" + name + "'");
1266 }
1267
1268 bool is_variable_sized{
1269 name != constants::coords && array_schema.var_size(name)};
1270 bool is_nullable{array_schema.is_nullable(name)};
1271
1272 // Compute tile overlap for each fragment
1273 compute_est_result_size(config, compute_tp);
1274 return {
1275 max_mem_size_[name].size_fixed_,
1276 is_variable_sized ? max_mem_size_[name].size_var_ : 0,
1277 is_nullable ? max_mem_size_[name].size_validity_ : 0};
1278}
1279
1280std::vector<uint64_t> Subarray::get_range_coords(uint64_t range_idx) const {
1281 std::vector<uint64_t> ret;

Callers 1

must_splitMethod · 0.80

Calls 6

SubarrayExceptionClass · 0.85
array_schema_latestMethod · 0.80
is_dimMethod · 0.80
is_attrMethod · 0.80
var_sizeMethod · 0.45
is_nullableMethod · 0.45

Tested by

no test coverage detected