tests/testthat/test-infer-parquet-schema.R

test_that("infer_parquet_schema", {
  expect_snapshot({
    as.data.frame(infer_parquet_schema(test_df(missing = FALSE)))
  })
  expect_snapshot({
    as.data.frame(infer_parquet_schema(test_df(missing = TRUE)))
  })
})

test_that("logical_to_converted", {
  expect_snapshot(error = TRUE, {
    logical_to_converted(list("DECIMAL"))
    logical_to_converted(list("TIME", TRUE, "SECS"))
    logical_to_converted(list("TIMESTAMP", TRUE, "SECS"))
    logical_to_converted(list("INT"))
    logical_to_converted(list("FOOBAR"))
  })
})

Try the nanoparquet package in your browser

Any scripts or data that you put into this service are public.

nanoparquet documentation built on April 3, 2025, 11:26 p.m.