Skip to content

Commit

Permalink
Behave differently for data.frames
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisnic committed Jan 4, 2023
1 parent fd3fef1 commit fadf40b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions r/R/array.R
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,13 @@ StructArray <- R6Class("StructArray",
)

StructArray$create <- function(...) {

args <- rlang::dots_list(..., .named = TRUE)

if (length(args) == 1 && is.data.frame(args[[1]])) {
return(Array$create(args[[1]]))
}

batch <- record_batch(!!! args)
array_ptr <- allocate_arrow_array()
schema_ptr <- allocate_arrow_schema()
Expand Down

0 comments on commit fadf40b

Please sign in to comment.