Skip to content

Commit

Permalink
Sparse without dups unordered uses indexreader (#3347)
Browse files Browse the repository at this point in the history
This fixes a mismatch between the serialization path and the query
strategy decision code that resulted in the serialization path
incorrectly trying to load the base reader state instead of the indexed
reader state.
  • Loading branch information
Shelnutt2 committed Jul 7, 2022
1 parent 2d57ae8 commit 5e02006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tiledb/sm/serialization/query.cc
Expand Up @@ -1279,6 +1279,7 @@ Status query_to_capnp(
}
} else if (
query.use_refactored_sparse_global_order_reader() && !schema.dense() &&
(query.condition() == nullptr || query.condition()->empty()) &&
(layout == Layout::GLOBAL_ORDER || layout == Layout::UNORDERED)) {
auto builder = query_builder->initReaderIndex();

Expand Down Expand Up @@ -1830,7 +1831,7 @@ Status query_from_capnp(
// heterogeneous coordinate changes
if (type == QueryType::READ) {
if (query_reader.hasReaderIndex() && !schema.dense() &&
layout == Layout::GLOBAL_ORDER) {
(layout == Layout::GLOBAL_ORDER || layout == Layout::UNORDERED)) {
// Strategy needs to be cleared here to create the correct reader.
query->clear_strategy();
RETURN_NOT_OK(query->set_layout_unsafe(layout));
Expand Down

0 comments on commit 5e02006

Please sign in to comment.