Skip to content

skip() certain tests if minimal arrow is detected #1

Description

@MichaelChirico

writeDuckDBTableParquet(ddf, out, indexcol = NULL, keycol = NULL,

I am running some revdep tests and found {DuckDBDataFrame} fails because my Docker image only installed {arrow} minimally:

══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-parquet-io.R:224:5'): writeDuckDBTableParquet clusters rows with cluster_by = zorder() ──
Error in `(function (cond)  .Internal(C_tryCatchHelper(addr, 1L, cond)))(structure(list(message = "NotImplemented: Support for codec 'zstd' not built\nIn order to read this file, you will need to reinstall arrow with additional features enabled.\nSet one of these environment variables before installing:\n\n * Sys.setenv(LIBARROW_MINIMAL = \"false\") (for all optional features, including 'zstd')\n * Sys.setenv(ARROW_WITH_ZSTD = \"ON\") (for just 'zstd')\n\nSee https://arrow.apache.org/docs/r/articles/install.html for details",      call = NULL), class = c("simpleError", "error", "condition")))`: error in evaluating the argument 'x' in selecting a method for function 'as.data.frame': NotImplemented: Support for codec 'zstd' not built
In order to read this file, you will need to reinstall arrow with additional features enabled.
Set one of these environment variables before installing:

 * Sys.setenv(LIBARROW_MINIMAL = "false") (for all optional features, including 'zstd')
 * Sys.setenv(ARROW_WITH_ZSTD = "ON") (for just 'zstd')

See https://arrow.apache.org/docs/r/articles/install.html for details
Backtrace:
    ▆
 1. ├─DuckDBDataFrame::writeDuckDBTableParquet(...) at test-parquet-io.R:224:5
 2. │ ├─BiocGenerics::as.data.frame(arrow::read_parquet(prep$pq_path))
 3. │ └─arrow::read_parquet(prep$pq_path)
 4. │   └─base::tryCatch(reader$ReadTable(), error = read_compressed_error)
 5. │     └─base (local) tryCatchList(expr, classes, parentenv, handlers)
 6. │       └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
 7. │         └─value[[3L]](cond)
 8. │           └─base::stop(e)
 9. └─base (local) `<fn>`(`<smplErrr>`)

(and 7 similar other such failures)

I think if it's possible to detect the missing zstd support, a skip() here makes sense rather than a test failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions