From a2492957ba9c3c566b807536aab07a4e6da5d755 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 1 Oct 2024 20:05:29 -0400 Subject: [PATCH 1/3] Fix #758 --- src/libtiledb.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libtiledb.cpp b/src/libtiledb.cpp index be816188a8..887aa09b59 100644 --- a/src/libtiledb.cpp +++ b/src/libtiledb.cpp @@ -757,7 +757,7 @@ XPtr libtiledb_dim(XPtr ctx, Rcpp::stop("dimension domain must be a c(lower bound, upper bound) pair"); } std::array _domain = {static_cast(domain_vec[0]), static_cast(domain_vec[1])}; - int16_t _tile_extent = Rcpp::as(tile_extent); + uint16_t _tile_extent = Rcpp::as(tile_extent); auto dim = new tiledb::Dimension(tiledb::Dimension::create(*ctx.get(), name, _domain, _tile_extent)); auto ptr = make_xptr(dim); return ptr; @@ -925,7 +925,7 @@ SEXP libtiledb_dim_get_domain(XPtr dim) { dim->domain().second}); } case TILEDB_UINT16: { - using DataType = tiledb::impl::tiledb_to_type::type; + using DataType = tiledb::impl::tiledb_to_type::type; return IntegerVector({dim->domain().first, dim->domain().second}); } @@ -1027,7 +1027,7 @@ SEXP libtiledb_dim_get_tile_extent(XPtr dim) { return Rcpp::wrap(static_cast(dim->tile_extent())); } case TILEDB_UINT16: { - using DataType = tiledb::impl::tiledb_to_type::type; + using DataType = tiledb::impl::tiledb_to_type::type; return Rcpp::wrap(static_cast(dim->tile_extent())); } case TILEDB_INT32: { From 0582dd7a3ae493c179c60ce57e04b166b572a721 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 1 Oct 2024 20:44:37 -0400 Subject: [PATCH 2/3] add unit-test coverage --- inst/tinytest/test_dim.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/inst/tinytest/test_dim.R b/inst/tinytest/test_dim.R index 99b0255d1b..9100138fc2 100644 --- a/inst/tinytest/test_dim.R +++ b/inst/tinytest/test_dim.R @@ -154,7 +154,11 @@ for (dtype in dimtypes) { "INT64" = as.integer64(1000), 1000) # default is 1000 - domain <- tiledb_domain(tiledb_dim("row", dom, tile, dtype)) + dimension <- tiledb_dim("row", dom, tile, dtype) + if (dtype != "ASCII") { # no extent for string dims + expect_silent(tile(dimension)) + } + domain <- tiledb_domain(dimension) attrib <- tiledb_attr("attr", type = "INT32") schema <- tiledb_array_schema(domain, attrib, sparse=TRUE) tiledb_array_create(uri, schema) From bca18aa0718e282ff9db3c29d2e7f894e962e658 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 1 Oct 2024 22:02:33 -0400 Subject: [PATCH 3/3] DESCRIPTION NEWS.md --- DESCRIPTION | 2 +- NEWS.md | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index b3b40bf8c6..f14df3c360 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tiledb Type: Package -Version: 0.30.1 +Version: 0.30.1.1 Title: Modern Database Engine for Complex Data Based on Multi-Dimensional Arrays Authors@R: c(person("TileDB, Inc.", role = c("aut", "cph")), person("Dirk", "Eddelbuettel", email = "dirk@tiledb.com", role = "cre")) diff --git a/NEWS.md b/NEWS.md index b3715fcc68..d023d0b4fb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# Unreleased + +* Fix [#758](https://github.com/TileDB-Inc/TileDB-R/issues/758) "Can't read domain for dimensions of type UINT16" + + # tiledb 0.30.1 * This release of the R package builds against [TileDB 2.26.1](https://github.com/TileDB-Inc/TileDB/releases/tag/2.26.1), and has also been tested against earlier releases as well as the development version (#757)