Skip to content

Commit

Permalink
Don't use non empty domain on empty array.
Browse files Browse the repository at this point in the history
This was introduced in #4710. In that PR, we could try to use the non empty domain of an array with no fragments, which is empty. This should fix python and R nightlies.

---
TYPE: NO_HISTORY
DESC: Don't use non empty domain on empty array.
  • Loading branch information
KiterLuc committed Feb 10, 2024
1 parent fbc1a0f commit 8b62156
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tiledb/sm/query/readers/sparse_global_order_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ Status SparseGlobalOrderReader<BitmapType>::dowork() {
auto timer_se = stats_->start_timer("dowork");
stats_->add_counter("loop_num", 1);

subarray_.reset_default_ranges();

// Check that the query condition is valid.
if (condition_.has_value()) {
throw_if_not_ok(condition_->check(array_schema_));
Expand All @@ -137,6 +135,8 @@ Status SparseGlobalOrderReader<BitmapType>::dowork() {
return Status::Ok();
}

subarray_.reset_default_ranges();

// Load initial data, if not loaded already.
throw_if_not_ok(load_initial_data());
purge_deletes_consolidation_ = !deletes_consolidation_no_purge_ &&
Expand Down
8 changes: 4 additions & 4 deletions tiledb/sm/query/readers/sparse_unordered_with_dups_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@ Status SparseUnorderedWithDupsReader<BitmapType>::dowork() {
auto timer_se = stats_->start_timer("dowork");
stats_->add_counter("loop_num", 1);

// Subarray is not known to be explicitly set until buffers are deserialized
subarray_.reset_default_ranges();
include_coords_ = subarray_.is_set();

// Make sure user didn't request delete timestamps.
if (buffers_.count(constants::delete_timestamps) != 0) {
return logger_->status(Status_SparseUnorderedWithDupsReaderError(
Expand All @@ -154,6 +150,10 @@ Status SparseUnorderedWithDupsReader<BitmapType>::dowork() {
return Status::Ok();
}

// Subarray is not known to be explicitly set until buffers are deserialized
subarray_.reset_default_ranges();
include_coords_ = subarray_.is_set();

// Load initial data, if not loaded already. Coords are only included if the
// subarray is set.
throw_if_not_ok(load_initial_data());
Expand Down

0 comments on commit 8b62156

Please sign in to comment.