Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read domain for dimensions of type UINT16 #758

Closed
LTLA opened this issue Oct 1, 2024 · 0 comments · Fixed by #759
Closed

Can't read domain for dimensions of type UINT16 #758

LTLA opened this issue Oct 1, 2024 · 0 comments · Fixed by #759
Assignees

Comments

@LTLA
Copy link
Contributor

LTLA commented Oct 1, 2024

MRE:

library(tiledb)

context <- tiledb_ctx()
collected <- list(tiledb_dim(ctx=context, "d1", c(1L, 100L), tile=10L, type="UINT16"))
dom <- tiledb_domain(ctx=context, dims=collected)
schema <- tiledb_array_schema(ctx=context, domain=dom, attrs=list(tiledb_attr(ctx=context, "FOO", type="FLOAT32")))

path <- tempfile()
tiledb_array_create(path, schema)

obj <- tiledb_array(path)
s <- schema(obj)
dims <- dimensions(s)
doms <- lapply(dims, domain)
## Error: Static type (INT16) does not match expected type (UINT16)

This is attributable to a typo at

TileDB-R/src/libtiledb.cpp

Lines 927 to 930 in 321175a

case TILEDB_UINT16: {
using DataType = tiledb::impl::tiledb_to_type<TILEDB_INT16>::type;
return IntegerVector({dim->domain<DataType>().first,
dim->domain<DataType>().second});

where TILEDB_UINT16 was intended.

Session information
R version 4.4.1 Patched (2024-06-20 r86796)
Platform: aarch64-apple-darwin22.6.0
Running under: macOS Ventura 13.6.9

Matrix products: default
BLAS:   /Users/luna/Software/R/R-4-4-branch/lib/libRblas.dylib
LAPACK: /Users/luna/Software/R/R-4-4-branch/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] RcppSpdlog_0.0.18 tiledb_0.30.0

loaded via a namespace (and not attached):
 [1] zoo_1.8-12        bit_4.5.0         compiler_4.4.1    tools_4.4.1
 [5] RcppCCTZ_0.2.12   spdl_0.0.5        Rcpp_1.0.13       nanoarrow_0.5.0.1
 [9] bit64_4.5.2       nanotime_0.3.10   grid_4.4.1        lattice_0.22-6
@johnkerl johnkerl self-assigned this Oct 1, 2024
johnkerl added a commit that referenced this issue Oct 1, 2024
johnkerl added a commit that referenced this issue Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants