You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a backend that always returns tbl_df/tbl/data.frame, which uses drop=FALSE by default, however, that runs into issues here (and perhaps other places?) where it's assumed that [ has drop=TRUE when doing rows[1,1], e.g.
── Failure: DBItest: Result: data_logical ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
rows[1L, 2L] (`actual`) not identical to FALSE (`expected`).
`actual` is an S3 object of class <tbl_df/tbl/data.frame>, a list
`expected` is a logical vector (FALSE)
Backtrace:
▆
1. └─DBItest:::spec_result$data_logical(ctx = ctx, con = global_con)
2. └─DBItest:::test_select_with_null(...) at rbuild/R/spec-result-roundtrip.R:29:5
3. └─DBItest:::test_select(..., .add_null = "below") at rbuild/R/spec-result-roundtrip.R:264:3
4. ├─base::eval(bquote(expect_identical(rows[1L, .(i)], .(value_or_testfun)))) at rbuild/R/spec-result-roundtrip.R:333:7
5. │ └─base::eval(bquote(expect_identical(rows[1L, .(i)], .(value_or_testfun))))
6. └─testthat::expect_identical(rows[1L, 2L], FALSE)
Is it safe to always do drop=TRUE here, or should we just keep skipping this test under "only data.frame returns are supported"?
I lean towards the former, because check_df() has several checks, none of which requires exact [.data.frame syntax:
DBItest/R/spec-result-roundtrip.R
Line 333 in f19fb4d
We have a backend that always returns tbl_df/tbl/data.frame, which uses
drop=FALSE
by default, however, that runs into issues here (and perhaps other places?) where it's assumed that[
hasdrop=TRUE
when doingrows[1,1]
, e.g.Is it safe to always do
drop=TRUE
here, or should we just keep skipping this test under "only data.frame returns are supported"?I lean towards the former, because
check_df()
has several checks, none of which requires exact[.data.frame
syntax:DBItest/R/spec-result-roundtrip.R
Line 317 in f19fb4d
DBItest/R/utils.R
Lines 78 to 91 in f19fb4d
The text was updated successfully, but these errors were encountered: