From 8b62156b82d82d199f9116a5699541e4e4e1a48c Mon Sep 17 00:00:00 2001 From: Luc Rancourt Date: Sat, 10 Feb 2024 17:20:38 +0100 Subject: [PATCH] Don't use non empty domain on empty array. This was introduced in https://github.com/TileDB-Inc/TileDB/pull/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. --- tiledb/sm/query/readers/sparse_global_order_reader.cc | 4 ++-- .../sm/query/readers/sparse_unordered_with_dups_reader.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tiledb/sm/query/readers/sparse_global_order_reader.cc b/tiledb/sm/query/readers/sparse_global_order_reader.cc index c5a78d31788..c4703673426 100644 --- a/tiledb/sm/query/readers/sparse_global_order_reader.cc +++ b/tiledb/sm/query/readers/sparse_global_order_reader.cc @@ -119,8 +119,6 @@ Status SparseGlobalOrderReader::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_)); @@ -137,6 +135,8 @@ Status SparseGlobalOrderReader::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_ && diff --git a/tiledb/sm/query/readers/sparse_unordered_with_dups_reader.cc b/tiledb/sm/query/readers/sparse_unordered_with_dups_reader.cc index 09fd3e70cf1..f51cf512c65 100644 --- a/tiledb/sm/query/readers/sparse_unordered_with_dups_reader.cc +++ b/tiledb/sm/query/readers/sparse_unordered_with_dups_reader.cc @@ -125,10 +125,6 @@ Status SparseUnorderedWithDupsReader::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( @@ -154,6 +150,10 @@ Status SparseUnorderedWithDupsReader::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());