Running ‘testthat.R’ [15s/16s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(duckdb)
  Loading required package: DBI
  > 
  > test_check("duckdb")
  Saving _problems/test-relational-44.R
  Saving _problems/test-relational-235.R
  Saving _problems/test-relational-269.R
  Saving _problems/test-relational-277.R
  Saving _problems/test-relational-288.R
  Saving _problems/test-relational-396.R
  Saving _problems/test-relational-407.R
  Saving _problems/test-relational-421.R
  Saving _problems/test-relational-571.R
  Saving _problems/test-relational-597.R
  Saving _problems/test-relational-609.R
  Saving _problems/test-relational-1004.R
  Saving _problems/test-relational-1035.R
  Saving _problems/test-relational-1072.R
  [ FAIL 14 | WARN 0 | SKIP 75 | PASS 800 ]
  
  ══ Skipped tests (75) ══════════════════════════════════════════════════════════
  • On CRAN (37): 'test-DBItest.R:1:1', 'test-array.R:174:1',
    'test-array.R:187:1', 'test-array.R:202:1', 'test-array.R:359:1',
    'test-arrow.R:18:1', 'test-arrow_stream.R:1:1',
    'test-backend-dbplyr__duckdb_connection.R:405:3',
    'test-backend-dbplyr__duckdb_connection.R:436:3',
    'test-backend-dbplyr__duckdb_connection.R:478:3',
    'test-backend-dbplyr__duckdb_connection.R:502:3',
    'test-backend-dbplyr__duckdb_connection.R:547:3',
    'test-backend-dbplyr__duckdb_connection.R:576:3',
    'test-backend-dbplyr__duckdb_connection.R:600:3',
    'test-backend-dbplyr__duckdb_connection.R:615:3',
    'test-duckdb-extensions.R:3:3', 'test-error-handling.R:1:1',
    'test-explain.R:1:1', 'test-extension_path.R:1:1', 'test-fetch_arrow.R:1:1',
    'test-map.R:42:3', 'test-multi_statement.R:1:1', 'test-register_arrow.R:1:1',
    'test-relational.R:51:1', 'test-relational.R:82:1',
    'test-relational.R:106:1', 'test-relational.R:121:1',
    'test-relational.R:904:1', 'test-relational.R:922:1',
    'test-relational.R:1042:1', 'test-signal.R:6:3', 'test-sql.R:38:1',
    'test-sql.R:133:1', 'test-sql.R:211:1', 'test-struct.R:51:3',
    'test-tbl__duckdb_connection.R:1:1', 'test-types.R:1:1'
  • TEST_RE2 is not TRUE (35): 'test-connect.R:59:3', 'test-connect.R:79:3',
    'test-connect.R:99:3', 'test-connect.R:119:3', 'test-connect.R:144:3',
    'test-connect.R:167:3', 'test-connect.R:188:3', 'test-dbwritetable.R:2:3',
    'test-factor.R:2:3', 'test-factor.R:24:3', 'test-factor.R:38:3',
    'test-factor.R:66:3', 'test-read.R:2:3', 'test-read.R:147:3',
    'test-readonly.R:2:3', 'test-register.R:40:3', 'test-rel_api.R:7572:3',
    'test-rel_api.R:7659:3', 'test-rel_api.R:7749:3', 'test-rel_api.R:7839:3',
    'test-rel_api.R:7929:3', 'test-rel_api.R:11050:3', 'test-rel_api.R:11142:3',
    'test-rel_api.R:11237:3', 'test-rel_api.R:11332:3', 'test-rel_api.R:11427:3',
    'test-shutdown.R:2:3', 'test-struct.R:111:3', 'test-struct.R:130:3',
    'test-timestamp.R:2:3', 'test-viewer.R:2:3', 'test-viewer.R:16:3',
    'test-viewer.R:36:3', 'test-viewer.R:57:3', 'test-viewer.R:75:3'
  • empty test (1): 'test-factor.R:78:1'
  • interactive() is not TRUE (2): 'test-connect.R:5:3', 'test-connect.R:15:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-relational.R:44:3'): we can recognize if a df is materialized ──
  Error in `df_is_materialized(df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_false(df_is_materialized(df)) at test-relational.R:44:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:235:3'): the altrep-conversion for relations works ──
  Error in `df_is_materialized(df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_false(df_is_materialized(df)) at test-relational.R:235:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Failure ('test-relational.R:269:3'): the altrep-conversion for relations work for weirdo types for strict = FALSE ──
  Expected `df_is_materialized(df)` to be FALSE.
  Differences:
  `actual`:   TRUE 
  `expected`: FALSE
  
  ── Error ('test-relational.R:277:3'): we can get the relation object back from an altrep df ──
  Error in `eval(code, test_env)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─duckdb:::rel_from_altrep_df(df) at test-relational.R:277:3
    2. │ └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    3. │   ├─rlang::try_fetch(...)
    4. │   │ ├─base::tryCatch(...)
    5. │   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    6. │   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    8. │   │ └─base::withCallingHandlers(...)
    9. │   └─duckdb:::rapi_rel_from_altrep_df(...)
   10. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   11. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   12. │   └─rlang:::signal_abort(cnd, .file)
   13. │     └─base::signalCondition(cnd)
   14. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   15.   └─handlers[[1L]](cnd)
   16.     └─duckdb:::rethrow_error_from_rapi(e, call)
   17.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:288:3'): rel_order() sorts NAs last ───────────────
  Error in `df_is_materialized(rel_df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_false(df_is_materialized(rel_df)) at test-relational.R:288:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(rel_df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:396:3'): Union all does not immediately materialize ──
  Error in `df_is_materialized(rel_df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_false(df_is_materialized(rel_df)) at test-relational.R:396:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(rel_df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:407:3'): Union all has the correct values ─────────
  Error in `df_is_materialized(rel_df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_false(df_is_materialized(rel_df)) at test-relational.R:407:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(rel_df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:421:3'): Union all keeps duplicates ───────────────
  Error in `df_is_materialized(rel_df)`: Not our 'special' data.frame, data1 is not external pointer
  i Context: rapi_rel_from_altrep_df
  Backtrace:
       ▆
    1. ├─testthat::expect_true(df_is_materialized(rel_df)) at test-relational.R:421:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─duckdb:::df_is_materialized(rel_df)
    5. │ └─duckdb:::rel_from_altrep_df(df, allow_materialized = FALSE)
    6. │   └─duckdb:::rethrow_rapi_rel_from_altrep_df(...)
    7. │     ├─rlang::try_fetch(...)
    8. │     │ ├─base::tryCatch(...)
    9. │     │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
   10. │     │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
   11. │     │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
   12. │     │ └─base::withCallingHandlers(...)
   13. │     └─duckdb:::rapi_rel_from_altrep_df(...)
   14. ├─duckdb (local) `<fn>`("rapi_rel_from_altrep_df", "Not our 'special' data.frame, data1 is not external pointer")
   15. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   16. │   └─rlang:::signal_abort(cnd, .file)
   17. │     └─base::signalCondition(cnd)
   18. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   19.   └─handlers[[1L]](cnd)
   20.     └─duckdb:::rethrow_error_from_rapi(e, call)
   21.       └─rlang::abort(msg, call = call)
  ── Failure ('test-relational.R:571:3'): Set Intersect returns set intersection ──
  Expected `df_is_materialized(rel_df)` to be FALSE.
  Differences:
  `actual`:   TRUE 
  `expected`: FALSE
  
  ── Failure ('test-relational.R:597:3'): Set Diff returns the set difference ────
  Expected `df_is_materialized(rel_df)` to be FALSE.
  Differences:
  `actual`:   TRUE 
  `expected`: FALSE
  
  ── Failure ('test-relational.R:609:3'): Symmetric difference returns the symmetric difference ──
  Expected `df_is_materialized(rel_df)` to be FALSE.
  Differences:
  `actual`:   TRUE 
  `expected`: FALSE
  
  ── Error ('test-relational.R:1004:3'): we don't crash with evaluation errors ───
  Error in `eval(code, test_env)`: Error evaluating duckdb query: Conversion Error: Could not convert string 'a' to DOUBLE when casting from source column a
  i Context: GetQueryResult
  Backtrace:
       ▆
    1. ├─duckdb:::rel_to_altrep(rel2) at test-relational.R:1004:3
    2. │ └─duckdb:::rethrow_rapi_rel_to_altrep(rel, n_rows = n_rows, n_cells = n_cells)
    3. │   ├─rlang::try_fetch(...)
    4. │   │ ├─base::tryCatch(...)
    5. │   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    6. │   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    8. │   │ └─base::withCallingHandlers(...)
    9. │   └─duckdb:::rapi_rel_to_altrep(rel, n_rows, n_cells)
   10. ├─duckdb (local) `<fn>`("GetQueryResult", "Error evaluating duckdb query: Conversion Error: Could not convert string 'a' to DOUBLE when casting from source column a")
   11. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   12. │   └─rlang:::signal_abort(cnd, .file)
   13. │     └─base::signalCondition(cnd)
   14. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   15.   └─handlers[[1L]](cnd)
   16.     └─duckdb:::rethrow_error_from_rapi(e, call)
   17.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:1035:3'): we don't crash with evaluation errors ───
  Error in `eval(code, test_env)`: Error evaluating duckdb query: Conversion Error: Could not convert string 'a' to DOUBLE when casting from source column a
  i Context: GetQueryResult
  Backtrace:
       ▆
    1. ├─duckdb:::rel_to_altrep(rel2) at test-relational.R:1035:3
    2. │ └─duckdb:::rethrow_rapi_rel_to_altrep(rel, n_rows = n_rows, n_cells = n_cells)
    3. │   ├─rlang::try_fetch(...)
    4. │   │ ├─base::tryCatch(...)
    5. │   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    6. │   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    8. │   │ └─base::withCallingHandlers(...)
    9. │   └─duckdb:::rapi_rel_to_altrep(rel, n_rows, n_cells)
   10. ├─duckdb (local) `<fn>`("GetQueryResult", "Error evaluating duckdb query: Conversion Error: Could not convert string 'a' to DOUBLE when casting from source column a")
   11. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   12. │   └─rlang:::signal_abort(cnd, .file)
   13. │     └─base::signalCondition(cnd)
   14. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   15.   └─handlers[[1L]](cnd)
   16.     └─duckdb:::rethrow_error_from_rapi(e, call)
   17.       └─rlang::abort(msg, call = call)
  ── Error ('test-relational.R:1072:3'): prudence ────────────────────────────────
  Error in `eval(code, test_env)`: Materialization is disabled, use `collect()` or `as_tibble()` to materialize.
  i Context: GetQueryResult
  Backtrace:
       ▆
    1. ├─duckdb:::rel_to_altrep(rel2, allow_materialization = FALSE) at test-relational.R:1072:3
    2. │ └─duckdb:::rethrow_rapi_rel_to_altrep(rel, n_rows = n_rows, n_cells = n_cells)
    3. │   ├─rlang::try_fetch(...)
    4. │   │ ├─base::tryCatch(...)
    5. │   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    6. │   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    7. │   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    8. │   │ └─base::withCallingHandlers(...)
    9. │   └─duckdb:::rapi_rel_to_altrep(rel, n_rows, n_cells)
   10. ├─duckdb (local) `<fn>`("GetQueryResult", "Materialization is disabled, use `collect()` or `as_tibble()` to materialize.")
   11. │ └─rlang::abort(error_parts, class = "duckdb_error", !!!fields)
   12. │   └─rlang:::signal_abort(cnd, .file)
   13. │     └─base::signalCondition(cnd)
   14. └─rlang (local) `<fn>`(`<dckdb_rr>`)
   15.   └─handlers[[1L]](cnd)
   16.     └─duckdb:::rethrow_error_from_rapi(e, call)
   17.       └─rlang::abort(msg, call = call)
  
  [ FAIL 14 | WARN 0 | SKIP 75 | PASS 800 ]
  Error:
  ! Test failures.
  Execution halted