Skip to content

Commit

Permalink
Minor interface completion at R level allowing nullable for char vec (#…
Browse files Browse the repository at this point in the history
…537)

* Minor interface completion at R level allowing nullable for char vec

* Update NEWS.md [ci skip]
  • Loading branch information
eddelbuettel committed Apr 6, 2023
1 parent f76dd7e commit 51f49b2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Expand Up @@ -10,6 +10,8 @@

* Group objects can be opened while supplying a Config object when 2.15.1 or newer is used (#535, #536)

* For character column buffer allocations, the helper function now accepts a `nullable` option (#537)

## Build and Test Systems

* Testing for Groups reflect the stricter behavior in config setting requiring a close array (#530)
Expand Down
5 changes: 3 additions & 2 deletions R/Query.R
Expand Up @@ -148,12 +148,13 @@ tiledb_query_create_buffer_ptr_char <- function(query, varvec) {
#'
#' @param sizeoffsets A numeric value with the size of the offsets vector
#' @param sizedata A numeric value of the size of the data string
#' @param nullable An optional boolean indicating whether the column can have NULLs
#' @return An external pointer to the allocated buffer object
#' @export
tiledb_query_alloc_buffer_ptr_char <- function(sizeoffsets, sizedata) {
tiledb_query_alloc_buffer_ptr_char <- function(sizeoffsets, sizedata, nullable=FALSE) {
stopifnot(`Argument 'sizeoffset' must be numeric` = is.numeric(sizeoffsets),
`Argument 'sizedata' must be numeric` = is.numeric(sizedata))
bufptr <- libtiledb_query_buffer_var_char_alloc_direct(sizeoffsets, sizedata)
bufptr <- libtiledb_query_buffer_var_char_alloc_direct(sizeoffsets, sizedata, nullable)
bufptr
}

Expand Down
11 changes: 9 additions & 2 deletions man/tiledb_group.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/tiledb_query_alloc_buffer_ptr_char.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51f49b2

Please sign in to comment.