diff --git a/r/src/array_to_vector.cpp b/r/src/array_to_vector.cpp index d92eaaea0a2..27fe6d15070 100644 --- a/r/src/array_to_vector.cpp +++ b/r/src/array_to_vector.cpp @@ -721,6 +721,10 @@ std::shared_ptr Converter::Make(const std::shared_ptr& type return std::make_shared>( std::move(arrays)); + case Type::UINT64: + return std::make_shared>( + std::move(arrays)); + case Type::HALF_FLOAT: return std::make_shared< arrow::r::Converter_Promotion>( diff --git a/r/tests/testthat/test-Array.R b/r/tests/testthat/test-Array.R index b105d2b158d..8749cd26426 100644 --- a/r/tests/testthat/test-Array.R +++ b/r/tests/testthat/test-Array.R @@ -385,6 +385,14 @@ test_that("Array$as_vector() converts to integer (ARROW-3794)", { expect_equal(a$as_vector(), 0:255) }) +test_that("Arrays of uint{32,64} convert to numeric", { + u32 <- Array$create(1L)$cast(uint32()) + expect_identical(as.vector(u32), 1) + + u64 <- Array$create(1L)$cast(uint64()) + expect_identical(as.vector(u64), 1) +}) + test_that("Array$create() recognise arrow::Array (ARROW-3815)", { a <- Array$create(1:10) expect_equal(a, Array$create(a)) diff --git a/r/vignettes/arrow.Rmd b/r/vignettes/arrow.Rmd index c9ae799bcf9..83e6b374034 100644 --- a/r/vignettes/arrow.Rmd +++ b/r/vignettes/arrow.Rmd @@ -129,7 +129,7 @@ In the tables, entries with a `-` are not currently implemented. | uint8 | integer | | uint16 | integer | | uint32 | double | -| uint64 | - | +| uint64 | double | | float16 | - | | float32 | double | | float64 | double |