Skip to content

Commit c5fbf45

Browse files
committed
Making methods public again.
1 parent dd61336 commit c5fbf45

File tree

4 files changed

+34
-44
lines changed

4 files changed

+34
-44
lines changed

tiledb/sm/subarray/range_subset.cc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,6 @@ tuple<Status, optional<std::string>> RangeSetAndSuperset::add_range(
172172
}
173173
}
174174

175-
void RangeSetAndSuperset::check_oob() {
176-
for (auto& range : ranges_) {
177-
impl_->check_range_is_valid(range);
178-
throw_if_not_ok(impl_->check_range_is_subset(range));
179-
}
180-
}
181-
182175
Status RangeSetAndSuperset::add_range_unrestricted(const Range& range) {
183176
if (is_implicitly_initialized_) {
184177
ranges_.clear();
@@ -187,4 +180,11 @@ Status RangeSetAndSuperset::add_range_unrestricted(const Range& range) {
187180
return impl_->add_range(ranges_, range);
188181
}
189182

183+
void RangeSetAndSuperset::check_oob() {
184+
for (auto& range : ranges_) {
185+
impl_->check_range_is_valid(range);
186+
throw_if_not_ok(impl_->check_range_is_subset(range));
187+
}
188+
}
189+
190190
} // namespace tiledb::sm

tiledb/sm/subarray/range_subset.h

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -419,9 +419,6 @@ class TypedRangeSetAndFullsetImpl<std::string, CoalesceAdds>
419419
*/
420420
class RangeSetAndSuperset {
421421
public:
422-
/** Friend Subarray for calling `add_range_unrestricted` */
423-
friend class Subarray;
424-
425422
/* ********************************* */
426423
/* CONSTRUCTORS & DESTRUCTORS */
427424
/* ********************************* */
@@ -487,6 +484,16 @@ class RangeSetAndSuperset {
487484
tuple<Status, optional<std::string>> add_range(
488485
Range& range, const bool read_range_oob_error = true);
489486

487+
/**
488+
* Adds a range to the range manager without performing any checkes.
489+
*
490+
* If the ranges are currently implicitly initialized, then they will be
491+
* cleared before the new range is added.
492+
*
493+
* @param range The range to add.
494+
*/
495+
Status add_range_unrestricted(const Range& range);
496+
490497
/**
491498
* Removes all ranges.
492499
*
@@ -568,20 +575,6 @@ class RangeSetAndSuperset {
568575

569576
/** Stored ranges. */
570577
std::vector<Range> ranges_{};
571-
572-
/* ********************************* */
573-
/* PRIVATE METHODS */
574-
/* ********************************* */
575-
576-
/**
577-
* Adds a range to the range manager without performing any checkes.
578-
*
579-
* If the ranges are currently implicitly initialized, then they will be
580-
* cleared before the new range is added.
581-
*
582-
* @param range The range to add.
583-
*/
584-
Status add_range_unrestricted(const Range& range);
585578
};
586579

587580
} // namespace tiledb::sm

tiledb/sm/subarray/subarray.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,17 @@ Status Subarray::add_range(
425425
dim_idx, Range(&range[0], 2 * coord_size), err_on_range_oob_);
426426
}
427427

428+
Status Subarray::add_range_unsafe(uint32_t dim_idx, const Range& range) {
429+
// Must reset the result size and tile overlap
430+
est_result_size_computed_ = false;
431+
tile_overlap_.clear();
432+
433+
// Add the range
434+
throw_if_not_ok(range_subset_[dim_idx].add_range_unrestricted(range));
435+
is_default_[dim_idx] = range_subset_[dim_idx].is_implicitly_initialized();
436+
return Status::Ok();
437+
}
438+
428439
Status Subarray::add_point_ranges(
429440
unsigned dim_idx, const void* start, uint64_t count, bool check_for_label) {
430441
if (dim_idx >= this->array_->array_schema_latest().dim_num()) {
@@ -2112,17 +2123,6 @@ void Subarray::add_default_ranges() {
21122123
add_default_label_ranges(dim_num);
21132124
}
21142125

2115-
Status Subarray::add_range_unsafe(uint32_t dim_idx, const Range& range) {
2116-
// Must reset the result size and tile overlap
2117-
est_result_size_computed_ = false;
2118-
tile_overlap_.clear();
2119-
2120-
// Add the range
2121-
throw_if_not_ok(range_subset_[dim_idx].add_range_unrestricted(range));
2122-
is_default_[dim_idx] = range_subset_[dim_idx].is_implicitly_initialized();
2123-
return Status::Ok();
2124-
}
2125-
21262126
void Subarray::add_default_label_ranges(dimension_size_type dim_num) {
21272127
label_range_subset_.clear();
21282128
label_range_subset_.resize(dim_num, nullopt);

tiledb/sm/subarray/subarray.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ class ITileRange {
151151
*/
152152
class Subarray {
153153
public:
154-
/** Friend with Query to call `add_range_unsafe` */
155-
friend class Query;
156-
157154
/* ********************************* */
158155
/* PUBLIC DATA TYPES */
159156
/* ********************************* */
@@ -478,6 +475,12 @@ class Subarray {
478475
Status add_range(
479476
unsigned dim_idx, const void* start, const void* end, const void* stride);
480477

478+
/**
479+
* Adds a range along the dimension with the given index, without
480+
* performing any error checks.
481+
*/
482+
Status add_range_unsafe(uint32_t dim_idx, const Range& range);
483+
481484
/**
482485
* @brief Set point ranges from an array
483486
*
@@ -1551,12 +1554,6 @@ class Subarray {
15511554
*/
15521555
void add_default_ranges();
15531556

1554-
/**
1555-
* Adds a range along the dimension with the given index, without
1556-
* performing any error checks.
1557-
*/
1558-
Status add_range_unsafe(uint32_t dim_idx, const Range& range);
1559-
15601557
/** Computes the estimated result size for all attributes/dimensions. */
15611558
Status compute_est_result_size(const Config* config, ThreadPool* compute_tp);
15621559

0 commit comments

Comments
 (0)