jonkeane commented on a change in pull request #10646:
URL: https://github.com/apache/arrow/pull/10646#discussion_r670703153



##########
File path: r/tests/testthat/test-metadata.R
##########
@@ -205,3 +205,27 @@ test_that("metadata of list elements (ARROW-10386)", {
   expect_identical(attr(as.data.frame(tab)$x[[1]], "foo"), "bar")
   expect_identical(attr(as.data.frame(tab)$x[[2]], "baz"), "qux")
 })
+
+
+test_that("metadata of list elements (ARROW-10386)", {
+  skip_if_not_available("dataset")
+  skip_if_not_available("parquet")
+  df <- tibble::tibble(
+    metadata = list(
+      structure(1, my_value_as_attr = 1),
+      structure(2, my_value_as_attr = 2),
+      structure(3, my_value_as_attr = 3),
+      structure(4, my_value_as_attr = 3)),
+    part = c(1, 3, 2, 1)
+  )
+
+  dst_dir <- make_temp_dir()
+  write_dataset(df, dst_dir, partitioning = "part")
+  ds <- open_dataset(dst_dir)
+  expect_warning(
+    df_from_ds <- dplyr::collect(ds),

Review comment:
       Yup, that works without warning (like it should as you say):
   
   ```
   > ds %>% select(part) %>% collect()
   # A tibble: 4 x 1
      part
   * <int>
   1     1
   2     1
   3     2
   4     3
   > 
   ```




-- 
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]


Reply via email to