Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@
^vignettes/Makefile
^inst/tinytest/test_timetravel_extra.R
^inst/tinytest/test_tiledbarray_extra.R
^codecov.yml
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tiledb
Type: Package
Version: 0.16.0.2
Version: 0.16.0.3
Title: Universal Storage Engine for Sparse and Dense Multidimensional Arrays
Authors@R: c(person("TileDB, Inc.", role = c("aut", "cph")),
person("Dirk", "Eddelbuettel", email = "dirk@tiledb.com", role = "cre"))
Expand Down
10 changes: 9 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,26 @@

* Support for testing group URIs on being relative has been added (#478)

* Logging support at the R and C++ level has been added (#479)
* Logging support at the R and C++ level has been added (#479, #487)

* Use of TileDB Embedded was upgraded to release 2.12.1, and 2.12.2 (#480, #481)

* Sparse array queries via tiledb_array and '[]' access use an UNORDERED query layout (#488)

## Bug Fixes

* Accomodate possible zero sized allocation estimates for attributes (#482)

* Detect missing columns in a write-attempt with partial data (#483)

## Build and Test Systems

* Update check-out action to version three suppressing a warning (#477)

* Code Coverage reports are now generated and available at codecov.io (#484)

* Small internal changes renaming two files and conditioning tests under two older releases (#485)


# tiledb 0.16.0

Expand Down
6 changes: 4 additions & 2 deletions R/TileDBArray.R
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,9 @@ setMethod("[", "tiledb_array",
nonemptydom <- mapply(getDomain, dimnames, dimtypes, SIMPLIFY=FALSE)
## open query
qryptr <- libtiledb_query(ctx@ptr, arrptr, "READ")
if (length(layout) > 0) libtiledb_query_set_layout(qryptr, layout)
qryptr <- libtiledb_query_set_layout(qryptr,
if (isTRUE(nchar(layout) > 0)) layout
else { if (sparse) "UNORDERED" else "COL_MAJOR" })

## ranges seem to interfere with the byte/element adjustment below so set up toggle
rangeunset <- TRUE
Expand Down Expand Up @@ -1155,7 +1157,7 @@ setMethod("[<-", "tiledb_array",

qryptr <- libtiledb_query(ctx@ptr, arrptr, "WRITE")
qryptr <- libtiledb_query_set_layout(qryptr,
if (length(layout) > 0) layout
if (isTRUE(nchar(layout) > 0)) layout
else { if (sparse) "UNORDERED" else "COL_MAJOR" })

buflist <- vector(mode="list", length=nc)
Expand Down
2 changes: 1 addition & 1 deletion inst/tinytest/test_arrayschemaevolution.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (Sys.info()[["sysname"]] == "Windows") exit_file("Skip on Windows")

ctx <- tiledb_ctx(limitTileDBCores())

if (tiledb_version(TRUE) < "2.4.0") exit_file("Needs TileDB 2.4.* or later")
if (tiledb_version(TRUE) < "2.11.0") exit_file("Needs TileDB 2.11.* or later")

df <- data.frame(key=letters[1:10],
val=1:10)
Expand Down
5 changes: 2 additions & 3 deletions inst/tinytest/test_matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ if (isOldWindows) exit_file("skip this file on old Windows releases")
ctx <- tiledb_ctx(limitTileDBCores())

uri <- tempfile()
M <- matrix(1:12, 3, 4, dimnames=list(LETTERS[1:3], letters[1:4]))
M <- matrix(1:16, 4, 4, dimnames=list(LETTERS[1:4], letters[1:4]))
fromMatrix(M, uri)

M2 <- toMatrix(uri)
expect_equivalent(M, M2)
expect_equivalent(M, t(M2)) # because we now default to UNORDERED we need to transpose


uri <- tempfile()
Expand All @@ -23,7 +23,6 @@ M2 <- toMatrix(uri)
expect_equivalent(M, M2)



uri <- tempfile()
M <- matrix(sqrt(1:20), 5, 4) # matrix without rownames, float values
fromMatrix(M, uri)
Expand Down
24 changes: 12 additions & 12 deletions inst/tinytest/test_tiledbarray.R
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -630,7 +630,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -661,7 +661,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -692,7 +692,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -723,7 +723,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -754,7 +754,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -785,7 +785,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[as.integer64(rep(1:4,each=4)), as.integer64(rep(1:4,4))] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[as.integer64(1:2), as.integer64(2:3)]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], as.integer64(c(1L, 1L, 2L, 2L)))
Expand Down Expand Up @@ -817,7 +817,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[as.integer64(rep(1:4,each=4)), as.integer64(rep(1:4,4))] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[as.integer64(1:2), as.integer64(2:3)]
expect_equal(newdata[,"a"], c(2L, 3L, 6L, 7L))
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
Expand Down Expand Up @@ -868,7 +868,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
#A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
expect_equal(newdata[,"cols"], c(2L, 3L, 2L, 3L))
Expand Down Expand Up @@ -924,7 +924,7 @@ if (requireNamespace("bit64", quietly=TRUE)) {
## or with indices
A[rep(1:4,each=4), rep(1:4,4)] <- data

A <- tiledb_array(uri = tmp, as.data.frame=TRUE)
A <- tiledb_array(uri = tmp, as.data.frame=TRUE, query_layout="ROW_MAJOR")
newdata <- A[1:2, 2:3]
expect_equal(newdata[,"rows"], c(1L, 1L, 2L, 2L))
expect_equal(newdata[,"cols"], c(2L, 3L, 2L, 3L))
Expand Down Expand Up @@ -1351,7 +1351,7 @@ data <- array(1:64, dim = c(4,4,4))
A <- tiledb_array(uri = uri)
A[] <- data

A <- tiledb_array(uri = uri, return_as="data.frame")
A <- tiledb_array(uri = uri, return_as="data.frame", query_layout="ROW_MAJOR")
res <- A[2,2,2]
expect_equal(res[, "a", drop=TRUE], 22)
res <- A[2,2:3,2]
Expand Down Expand Up @@ -1421,7 +1421,7 @@ if (v[["major"]] == 2L && v[["minor"]] %in% c(4L, 10L)) exit_file("Skip remainde

## check for incomplete status on unsuccessful query
set_allocation_size_preference(256) # too low for penguins to return something
array <- tiledb_array(uri, as.data.frame=TRUE)
array <- tiledb_array(uri, as.data.frame=TRUE, query_layout="ROW_MAJOR")
expect_warning(res <- array[]) # warning emitted
expect_equal(attr(res, "query_status"), "INCOMPLETE") # and query status reported

Expand Down