From 3d4aa74d5080825048bc5b6e903c75b8c8dff7d1 Mon Sep 17 00:00:00 2001 From: KiterLuc <67824247+KiterLuc@users.noreply.github.com> Date: Tue, 9 Jul 2024 21:10:34 +0300 Subject: [PATCH] Warn users using dense arrays with sparse fragments. (#5116) Support for reading sparse fragments in dense arrays will be removed in TileDB version 2.27 to be released in September 2024. To make sure these arrays continue to work after an upgrade to version 2.27 or later, please consolidate the sparse fragments using a TileDB version 2.26 or earlier. For now, this adds a warning to user using dense arrays with sparse fragment. Support for writing sparse fragments in dense arrays was removed in TileDB 2.5 and as the user can easily consolidate to get rid of sparse fragments, the decision was made to remove support for reading these arrays. [sc-47348] --- TYPE: DEPRECATION DESC: Warn users using dense arrays with sparse fragments. (cherry picked from commit 7b88c3e1997005e34cb70ca7598d84f58a9237f6) --- tiledb/sm/query/query.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tiledb/sm/query/query.cc b/tiledb/sm/query/query.cc index 154dfe68d263..5f1e623b32b5 100644 --- a/tiledb/sm/query/query.cc +++ b/tiledb/sm/query/query.cc @@ -1880,6 +1880,18 @@ Status Query::create_strategy(bool skip_checks_serialization) { all_dense &= frag_md->dense(); } + // We are going to deprecate dense arrays with sparse fragments in 2.27 but + // log a warning for now. + if (array_schema_->dense() && !all_dense) { + LOG_WARN( + "This dense array contains sparse fragments. Support for reading " + "sparse fragments in dense arrays will be removed in TileDB version " + "2.27 to be released in September 2024. To make sure this array " + "continues to work after an upgrade to version 2.27 or later, please " + "consolidate the sparse fragments using a TileDB version 2.26 or " + "earlier."); + } + if (is_dimension_label_ordered_read_) { strategy_ = tdb_unique_ptr(tdb_new( OrderedDimLabelReader,