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

Method reset_default_ranges

tiledb/sm/subarray/subarray.cc:1771–1792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1769}
1770
1771void Subarray::reset_default_ranges() {
1772 if (array_->non_empty_domain_computed()) {
1773 auto dim_num = array_->array_schema_latest().dim_num();
1774 auto& domain{array_->array_schema_latest().domain()};
1775
1776 // Process all dimensions one by one.
1777 for (unsigned d = 0; d < dim_num; d++) {
1778 // Only enter the check if there are only one range set on the dimension.
1779 if (!is_default_[d] && range_subset_[d].num_ranges() == 1) {
1780 // If the range set is the same as the non empty domain.
1781 auto& ned = array_->non_empty_domain()[d];
1782 if (ned == range_subset_[d][0]) {
1783 // Reset the default flag and reset the range subset to be default.
1784 is_default_[d] = true;
1785 auto dim{domain.dimension_ptr(d)};
1786 range_subset_[d] = RangeSetAndSuperset(
1787 dim->type(), dim->domain(), true, coalesce_ranges_);
1788 }
1789 }
1790 }
1791 }
1792}
1793
1794void Subarray::compute_range_offsets() {
1795 range_offsets_.clear();

Callers 2

doworkMethod · 0.80
doworkMethod · 0.80

Calls 9

RangeSetAndSupersetClass · 0.85
array_schema_latestMethod · 0.80
num_rangesMethod · 0.80
dim_numMethod · 0.45
domainMethod · 0.45
non_empty_domainMethod · 0.45
dimension_ptrMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected