Skip to content

Commit

Permalink
fix: make test more accurate for these types
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed Jan 4, 2023
1 parent 2410d36 commit 821f24c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions r/tests/testthat/test-parquet.R
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,12 @@ test_that("Can read parquet with nested lists and maps", {
skip_if_not(dir.exists(parquet_test_data), "Parquet test data missing")

pq <- read_parquet(paste0(parquet_test_data, "/nested_lists.snappy.parquet"), as_data_frame = FALSE)
expect_equal(pq$a$type, list_of(list_of(list_of(utf8()))))
expect_equal(pq$a$type, list_of(list_of(list_of(utf8()))), ignore_attr = TRUE)

pq <- read_parquet(paste0(parquet_test_data, "/nested_maps.snappy.parquet"), as_data_frame = FALSE)
expect_equal(pq$a$type, map_of(utf8(), map_of(int32(), field("val", boolean(), nullable = FALSE))))
expect_equal(
pq$a$type,
map_of(utf8(), map_of(int32(), field("val", boolean(), nullable = FALSE))),
ignore_attr = TRUE
)
})

0 comments on commit 821f24c

Please sign in to comment.