You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/13 13:34:42 UTC
[GitHub] [arrow] paleolimbot commented on a diff in pull request #14922: ARROW-16266: [R] Add StructArray$create()
paleolimbot commented on code in PR #14922:
URL: https://github.com/apache/arrow/pull/14922#discussion_r1047162742
##########
r/R/array.R:
##########
@@ -450,6 +440,44 @@ StructArray <- R6Class("StructArray",
)
)
+StructArray$create <- function(...) {
+ dots <- list2(...)
Review Comment:
Would starting this with:
```r
batch <- record_batch(...)
```
...allow you to avoid everything below? I think in C++ you can create a struct array from:
```r
std::shared_ptr<arrow::RecordBatch> batch;
arrow::StructArray::Make(batch->columns(), batch->schema()->field_names());
``
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org