thisisnic commented on code in PR #49712:
URL: https://github.com/apache/arrow/pull/49712#discussion_r4523717060
##########
r/tests/testthat/test-Table.R:
##########
@@ -371,6 +371,28 @@ test_that("Can create table with specific dictionary
types", {
expect_equal_data_frame(tab_large, fact)
})
+test_that("Table converts dictionary arrays with wider index types back to R",
{
+ fact <- example_data[, "fct"]
+ for (i in list(uint32(), int64(), uint64())) {
+ sch <- schema(fct = dictionary(i, utf8()))
+ tab <- Table$create(fact, schema = sch)
+ expect_equal(tab$schema, sch)
+ expect_equal_data_frame(tab, fact)
+ }
+})
+
+test_that("Table converts dictionary arrays with string_view values", {
+ expected <- data.frame(foo = factor(c("x", NA, "x")))
Review Comment:
Done
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]