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

Minor interface completion at R level allowing nullable for char vec #537

Merged
merged 2 commits into from Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a unit-test case to cover the nullable=FALSE and nullable=TRUE cases in this code change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some pending work around arrow support where that may fit in.

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.