Skip to content

Commit 7e25ef2

Browse files
ARROW-13111: [R] altrep vectors for ChunkedArray
``` r library(arrow, warn.conflicts = FALSE) #> See arrow_info() for available features (c_str <- ChunkedArray$create(c("un", "deux"), c("trois", "quatre"))) #> ChunkedArray #> [ #> [ #> "un", #> "deux" #> ], #> [ #> "trois", #> "quatre" #> ] #> ] (v_str <- c_str$as_vector()) #> [1] "un" "deux" "trois" "quatre" .Internal(inspect(v_str)) #> @7ff3ff98f540 16 STRSXP g0c0 [REF(65535)] arrow::ChunkedArray<0x7ff3f64a2128, string, 2 chunks, 0 nulls> len=4 ``` <sup>Created on 2021-10-08 by the [reprex package](https://reprex.tidyverse.org) (v2.0.1.9000)</sup> Only dealing with strings for now, int and double coming next. Closes #11369 from romainfrancois/ARROW_13111_chunked_array_altrep Lead-authored-by: Romain Francois <[email protected]> Co-authored-by: Antoine Pitrou <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
1 parent c038e61 commit 7e25ef2

15 files changed

Lines changed: 380 additions & 195 deletions

‎dev/release/rat_exclude_files.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ r/man/*.Rd
193193
r/cran-comments.md
194194
r/vignettes/*.Rmd
195195
r/tests/testthat/test-*.txt
196+
r/tests/testthat/_snaps/*.md
196197
r/inst/include/cpp11.hpp
197198
r/inst/include/cpp11/*.hpp
198199
.gitattributes

‎r/DESCRIPTION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Suggests:
5656
rmarkdown,
5757
stringi,
5858
stringr,
59-
testthat,
59+
testthat (>= 3.1.0),
6060
tibble,
6161
withr
6262
Collate:

‎r/R/array.R‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ Array <- R6Class("Array",
166166
View = function(type) {
167167
Array$create(Array__View(self, as_type(type)))
168168
},
169+
Same = function(other) Array__Same(self, other),
169170
Validate = function() Array__Validate(self),
170171
export_to_c = function(array_ptr, schema_ptr) ExportArray(self, array_ptr, schema_ptr)
171172
),
@@ -186,7 +187,7 @@ Array$create <- function(x, type = NULL) {
186187
}
187188
return(out)
188189
}
189-
vec_to_arrow(x, type)
190+
vec_to_Array(x, type)
190191
}
191192
#' @include arrowExports.R
192193
Array$import_from_c <- ImportArray

‎r/R/arrowExports.R‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)