Skip to content

Commit

Permalink
move skips
Browse files Browse the repository at this point in the history
  • Loading branch information
nbenn committed Dec 22, 2023
1 parent 5f36103 commit 623dda0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions R/dbBind_AdbiResult.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ dbBind_AdbiResult <- function(res, params, ...) {
params <- as.list(params)
}

fct <- vapply(params, is.factor, logical(1L))

if (any(fct)) {
warning("Binding factors as character.", call. = FALSE)
params[fct] <- lapply(params[fct], as.character)
}

if (is.list(params) && !inherits(params, "data.frame")) {
params <- as.data.frame(lapply(params, I), fix.empty.names = FALSE)
}
Expand Down
5 changes: 2 additions & 3 deletions tests/testthat/test-DBItest.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ if (identical(Sys.getenv("NOT_CRAN"), "true") &&
"data_logical", # r-dbi/DBItest#308
"create_table_visible_in_other_connection", # r-dbi/DBItest#297
"quote_identifier_string", # apache/arrow-adbc#1395
"read_table_empty", # apache/arrow-adbc#1400

# misc issues with poorly understood causes
"append_table_new", # SQL error
"bind_factor", # no warnings?
"arrow_bind_factor", # no warnings?
"read_table_empty",
"list_objects_features",
"begin_write_commit",

# cause segfaults
"begin_write_disconnect",
Expand Down

0 comments on commit 623dda0

Please sign in to comment.