Skip to content

Commit

Permalink
[r] Deal with int64 corner case (#607)
Browse files Browse the repository at this point in the history
* [r] Deal with int64 corner case

* Update NEWS and roll micro release [ci skip]
  • Loading branch information
eddelbuettel authored Oct 31, 2023
1 parent 62c152f commit 449fa31
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
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.21.1.10
Version: 0.21.1.11
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
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

* Use of TileDB Embedded was upgraded to release 2.17.3 (#606)

* Factor variables with (unlikely) int64 indices are supported (#607)

## Bug Fixes

* The DESCRIPTION file now correctly refers to macOS 10.14 (#596)
Expand Down
3 changes: 3 additions & 0 deletions R/TileDBArray.R
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,9 @@ setMethod("[", "tiledb_array",

col <- col + 1L # adjust for zero-index C/C++ layer

if (inherits(col, "integer64")) # can happen when Python writes
col <- as.integer(col)

## special case from schema evolution could have added twice so correct
if (min(col, na.rm=TRUE) == 2 && max(col, na.rm=TRUE) == length(dct) + 1)
col <- col - 1L
Expand Down

0 comments on commit 449fa31

Please sign in to comment.