diff --git a/R/spec-arrow-append-table-arrow.R b/R/spec-arrow-append-table-arrow.R index 7139d9b91..ec4f134cb 100644 --- a/R/spec-arrow-append-table-arrow.R +++ b/R/spec-arrow-append-table-arrow.R @@ -9,8 +9,8 @@ spec_arrow_append_table_arrow <- list( expect_equal(names(formals(dbAppendTableArrow)), c("conn", "name", "value", "...")) }, - arrow_append_table_arrow_return = function(con, table_name) { - skip("Failed in SQLite") + arrow_append_table_arrow_return = function(ctx, con, table_name) { + skip_if_not_dbitest(ctx, "1.8.0.50") #' @return #' `dbAppendTableArrow()` returns a @@ -74,8 +74,8 @@ spec_arrow_append_table_arrow <- list( }, #' - arrow_append_table_arrow_roundtrip_keywords = function(con) { - skip("Requires dbBind() on RMariaDB") + arrow_append_table_arrow_roundtrip_keywords = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.49") #' @section Specification: #' SQL keywords can be used freely in table names, column names, and data. @@ -87,7 +87,7 @@ spec_arrow_append_table_arrow <- list( }, arrow_append_table_arrow_roundtrip_quotes = function(ctx, con, table_name) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.48") #' Quotes, commas, spaces, and other special characters such as newlines and tabs, #' can also be used in the data, @@ -197,7 +197,7 @@ spec_arrow_append_table_arrow <- list( }, # arrow_append_table_arrow_roundtrip_64_bit_character = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.47") tbl_in <- data.frame(a = c(-1e14, 1e15)) tbl_exp <- tbl_in @@ -214,8 +214,8 @@ spec_arrow_append_table_arrow <- list( ) }, # - arrow_append_table_arrow_roundtrip_64_bit_roundtrip = function(con, table_name) { - skip("Requires dbBind() on RMariaDB") + arrow_append_table_arrow_roundtrip_64_bit_roundtrip = function(ctx, con, table_name) { + skip_if_not_dbitest(ctx, "1.8.0.46") tbl_in <- data.frame(a = c(-1e14, 1e15)) dbWriteTable(con, table_name, tbl_in, field.types = c(a = "BIGINT")) @@ -224,8 +224,8 @@ spec_arrow_append_table_arrow <- list( test_arrow_roundtrip(use_append = TRUE, con, tbl_out, tbl_expected = tbl_out) }, - arrow_append_table_arrow_roundtrip_character = function(con) { - skip("Requires dbBind() on RMariaDB") + arrow_append_table_arrow_roundtrip_character = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.45") #' - character (in both UTF-8 tbl_in <- data.frame( @@ -236,8 +236,8 @@ spec_arrow_append_table_arrow <- list( test_arrow_roundtrip(use_append = TRUE, con, tbl_in) }, - arrow_append_table_arrow_roundtrip_character_native = function(con) { - skip("Requires dbBind() on RMariaDB") + arrow_append_table_arrow_roundtrip_character_native = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.44") #' and native encodings), tbl_in <- data.frame( @@ -265,8 +265,8 @@ spec_arrow_append_table_arrow <- list( test_arrow_roundtrip(use_append = TRUE, con, tbl_in) }, - arrow_append_table_arrow_roundtrip_factor = function(con) { - skip("Failed in SQLite") + arrow_append_table_arrow_roundtrip_factor = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.43") #' - factor (returned as character, tbl_in <- data.frame( @@ -283,7 +283,7 @@ spec_arrow_append_table_arrow <- list( }, arrow_append_table_arrow_roundtrip_raw = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.42") #' - list of raw #' (if supported by the database) @@ -305,7 +305,7 @@ spec_arrow_append_table_arrow <- list( }, arrow_append_table_arrow_roundtrip_blob = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.41") #' - objects of type [blob::blob] #' (if supported by the database) @@ -435,7 +435,7 @@ spec_arrow_append_table_arrow <- list( }, arrow_append_table_arrow_roundtrip_timestamp_extended = function(ctx, con) { - skip("Fails in RPostgres and RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.40") #' also for timestamps prior to 1970 or 1900 or after 2038 if (!isTRUE(ctx$tweaks$timestamp_typed)) { diff --git a/R/spec-arrow-create-table-arrow.R b/R/spec-arrow-create-table-arrow.R index 453f1ed2f..1d945e4f2 100644 --- a/R/spec-arrow-create-table-arrow.R +++ b/R/spec-arrow-create-table-arrow.R @@ -4,8 +4,8 @@ #' @format NULL #' @keywords NULL spec_arrow_create_table_arrow <- list( - arrow_create_table_arrow_formals = function() { - skip("Failed in SQLite") + arrow_create_table_arrow_formals = function(ctx) { + skip_if_not_dbitest(ctx, "1.8.0.13") # expect_equal(names(formals(dbCreateTableArrow)), c("conn", "name", "value", "...", "temporary")) diff --git a/R/spec-arrow-fetch-arrow-chunk.R b/R/spec-arrow-fetch-arrow-chunk.R index 17261ac22..6f0aa5b74 100644 --- a/R/spec-arrow-fetch-arrow-chunk.R +++ b/R/spec-arrow-fetch-arrow-chunk.R @@ -40,8 +40,8 @@ spec_arrow_fetch_arrow_chunk <- list( }, #' - arrow_fetch_arrow_chunk_closed = function(con) { - skip("Fails in adbc") + arrow_fetch_arrow_chunk_closed = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.11") #' @section Failure modes: #' An attempt to fetch from a closed result set raises an error. diff --git a/R/spec-arrow-fetch-arrow.R b/R/spec-arrow-fetch-arrow.R index 1cbb5738d..4cd822332 100644 --- a/R/spec-arrow-fetch-arrow.R +++ b/R/spec-arrow-fetch-arrow.R @@ -40,8 +40,8 @@ spec_arrow_fetch_arrow <- list( }, #' - arrow_fetch_arrow_closed = function(con) { - skip("Fails in adbc") + arrow_fetch_arrow_closed = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.15") #' @section Failure modes: #' An attempt to fetch from a closed result set raises an error. diff --git a/R/spec-arrow-get-query-arrow.R b/R/spec-arrow-get-query-arrow.R index 5ef5b78c8..5de9b0bd2 100644 --- a/R/spec-arrow-get-query-arrow.R +++ b/R/spec-arrow-get-query-arrow.R @@ -30,8 +30,8 @@ spec_arrow_get_query_arrow <- list( expect_identical(rows, result) }, - arrow_get_query_arrow_zero_rows = function(con) { - skip("Causes segfault in adbc") + arrow_get_query_arrow_zero_rows = function(ctx, con) { + skip_if_not_dbitest(ctx, "1.8.0.12") #' or zero rows. # Not all SQL dialects seem to support the query used here. diff --git a/R/spec-arrow-read-table-arrow.R b/R/spec-arrow-read-table-arrow.R index b6d838544..b0914aebc 100644 --- a/R/spec-arrow-read-table-arrow.R +++ b/R/spec-arrow-read-table-arrow.R @@ -32,7 +32,7 @@ spec_arrow_read_table_arrow <- list( }, arrow_read_table_arrow_empty = function(ctx, con, table_name) { - skip("Causes segfault in adbc and duckdb") + skip_if_not_dbitest(ctx, "1.8.0.14") #' @return #' An empty table is returned as an Arrow object with zero rows. diff --git a/R/spec-arrow-write-table-arrow.R b/R/spec-arrow-write-table-arrow.R index 82efb056b..f4553172d 100644 --- a/R/spec-arrow-write-table-arrow.R +++ b/R/spec-arrow-write-table-arrow.R @@ -17,8 +17,8 @@ spec_arrow_write_table_arrow <- list( }, #' - arrow_write_table_arrow_error_overwrite = function(con, table_name) { - skip("Failed in SQLite") + arrow_write_table_arrow_error_overwrite = function(ctx, con, table_name) { + skip_if_not_dbitest(ctx, "1.8.0.39") #' @section Failure modes: #' If the table exists, and both `append` and `overwrite` arguments are unset, @@ -54,7 +54,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_error = function(ctx, con, table_name) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.38") #' An error is also raised test_in <- stream_frame(a = 1L) @@ -190,7 +190,7 @@ spec_arrow_write_table_arrow <- list( #' arrow_write_table_arrow_overwrite = function(ctx, con, table_name) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.37") #' If the `overwrite` argument is `TRUE`, an existing table of the same name #' will be overwritten. @@ -205,7 +205,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_overwrite_missing = function(ctx, con, table_name) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.36") #' This argument doesn't change behavior if the table does not exist yet. penguins_in <- get_penguins(ctx) @@ -219,7 +219,7 @@ spec_arrow_write_table_arrow <- list( #' arrow_write_table_arrow_append = function(ctx, con, table_name) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.35") #' If the `append` argument is `TRUE`, the rows in an existing table are #' preserved, and the new data are appended. @@ -231,7 +231,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_append_new = function(ctx, con, table_name) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.34") #' If the table doesn't exist yet, it is created. penguins <- get_penguins(ctx) @@ -242,7 +242,7 @@ spec_arrow_write_table_arrow <- list( #' arrow_write_table_arrow_temporary = function(ctx, con, table_name = "dbit08") { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.33") #' If the `temporary` argument is `TRUE`, the table is not available in a #' second connection and is gone after reconnecting. @@ -261,7 +261,7 @@ spec_arrow_write_table_arrow <- list( }, # second stage arrow_write_table_arrow_temporary = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.32") if (!isTRUE(ctx$tweaks$temporary_tables)) { skip("tweak: temporary_tables") @@ -272,7 +272,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_visible_in_other_connection = function(ctx, local_con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.31") #' A regular, non-temporary table is visible in a second connection, penguins30 <- get_penguins(ctx) @@ -288,7 +288,7 @@ spec_arrow_write_table_arrow <- list( }, # second stage arrow_write_table_arrow_visible_in_other_connection = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.30") #' in a pre-existing connection, penguins30 <- get_penguins(ctx) @@ -299,7 +299,7 @@ spec_arrow_write_table_arrow <- list( }, # third stage arrow_write_table_arrow_visible_in_other_connection = function(ctx, local_con, table_name = "dbit09") { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.29") #' and after reconnecting to the database. penguins30 <- get_penguins(ctx) @@ -309,7 +309,7 @@ spec_arrow_write_table_arrow <- list( #' arrow_write_table_arrow_roundtrip_keywords = function(ctx, con) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.28") #' SQL keywords can be used freely in table names, column names, and data. tbl_in <- data.frame( @@ -320,7 +320,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_quotes = function(ctx, con, table_name) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.27") #' Quotes, commas, spaces, and other special characters such as newlines and tabs, #' can also be used in the data, @@ -360,7 +360,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_quotes_column_names = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.26") #' and column names. skip_if_not_dbitest(ctx, "1.7.2") @@ -399,7 +399,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_logical = function(ctx, con) { - skip("Fails in adbc") + skip_if_not_dbitest(ctx, "1.8.0.25") #' - logical tbl_in <- data.frame(a = c(TRUE, FALSE, NA)) @@ -434,7 +434,7 @@ spec_arrow_write_table_arrow <- list( }, # arrow_write_table_arrow_roundtrip_64_bit_character = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.24") tbl_in <- data.frame(a = c(-1e14, 1e15)) tbl_exp <- tbl_in @@ -450,8 +450,8 @@ spec_arrow_write_table_arrow <- list( ) }, # - arrow_write_table_arrow_roundtrip_64_bit_roundtrip = function(con, table_name) { - skip("Failed in SQLite") + arrow_write_table_arrow_roundtrip_64_bit_roundtrip = function(ctx, con, table_name) { + skip_if_not_dbitest(ctx, "1.8.0.23") tbl_in <- data.frame(a = c(-1e14, 1e15)) dbWriteTableArrow(con, table_name, tbl_in, field.types = c(a = "BIGINT")) @@ -461,7 +461,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_character = function(ctx, con) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.22") #' - character (in both UTF-8 tbl_in <- data.frame( @@ -473,7 +473,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_character_native = function(ctx, con) { - skip("Requires dbBind() on RMariaDB") + skip_if_not_dbitest(ctx, "1.8.0.21") #' and native encodings), tbl_in <- data.frame( @@ -502,7 +502,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_factor = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.20") #' - factor (returned as character) tbl_in <- data.frame( @@ -514,7 +514,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_raw = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.19") #' - list of raw #' (if supported by the database) @@ -535,7 +535,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_blob = function(ctx, con) { - skip("Failed in SQLite") + skip_if_not_dbitest(ctx, "1.8.0.18") #' - objects of type [blob::blob] #' (if supported by the database) @@ -626,7 +626,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_timestamp = function(ctx, con) { - skip("Fails in adbc") + skip_if_not_dbitest(ctx, "1.8.0.17") #' - timestamp #' (if supported by the database; @@ -663,7 +663,7 @@ spec_arrow_write_table_arrow <- list( }, arrow_write_table_arrow_roundtrip_timestamp_extended = function(ctx, con) { - skip("Fails in adbc") + skip_if_not_dbitest(ctx, "1.8.0.16") #' also for timestamps prior to 1970 or 1900 or after 2038 if (!isTRUE(ctx$tweaks$timestamp_typed)) {