New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revdep check results for dplyr 0.8.0 RC #190

Closed
romainfrancois opened this Issue Dec 20, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@romainfrancois
Member

romainfrancois commented Dec 20, 2018

https://github.com/tidyverse/dplyr/blob/revdep_dplyr_0_8_0_RC/revdep/problems.md#dbplyr

> revdep_details(revdep = "dbplyr")
══ Reverse dependency check ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ dbplyr 1.2.2 ══

Status: BROKEN

── Newly failing

✖ checking tests ...

── Before ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
0 errors ✔ | 0 warnings ✔ | 0 notes ✔

── After ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
❯ checking tests ...
  See below...

── Test failures ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── testthat ────

> library(testthat)
> library(dbplyr)
> 
> test_check("dbplyr")
Registering testing src: df OK
Registering testing src: sqlite OK
Registering testing src: mysql 
* Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Registering testing src: MariaDB 
* Failed to connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Registering testing src: postgres Error in connection_create(host, username, password, dbname, as.integer(port),  : 
  Failed to connect: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> .local -> connection_create
In addition: Warning message:
In dbDisconnect(con) : restarting interrupted promise evaluation

* RS-DBI driver: (could not connect romain@localhost:5432 on dbname "test": could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
)
Error in postgresqlNewConnection(drv, ...) : 
  RS-DBI driver: (could not connect romain@localhost:5432 on dbname "test": could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
)
Calls: <Anonymous> ... <Anonymous> -> <Anonymous> -> postgresqlNewConnection
In addition: Warning message:
In dbDisconnect(con) : restarting interrupted promise evaluation
Error in .local(drv, ...) : 
  Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Calls: <Anonymous> ... dbDisconnect -> <Anonymous> -> <Anonymous> -> .local
In addition: Warning message:
In dbDisconnect(con) : restarting interrupted promise evaluation
── 1. Error: named argument become list columns (@test-do.R#14)  ───────────────
argument must be coercible to non-negative integer
1: mf %>% do(nrow = nrow(.), ncol = ncol(.)) at testthat/test-do.R:14
2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
3: eval(quote(`_fseq`(`_lhs`)), env, env)
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: `_fseq`(`_lhs`)
6: freduce(value, `_function_list`)
7: withVisible(function_list[[k]](value))
8: function_list[[k]](value)
9: do(., nrow = nrow(.), ncol = ncol(.))
10: do.tbl_sql(., nrow = nrow(.), ncol = ncol(.)) at /Users/romain/git/tidyverse/dplyr/R/do.r:91
11: query$fetch_paged(.chunk_size, function(chunk) {
       if (!is_null(last_group)) {
           chunk <- rbind(last_group, chunk)
       }
       grouped <- chunk %>% group_by(!!!syms(names(chunk)[gvars]))
       index <- attr(grouped, "indices")
       n <- length(index)
       last_group <<- chunk[index[[length(index)]] + 1L, , drop = FALSE]
       for (j in seq_len(n - 1)) {
           cur_chunk <- chunk[index[[j]] + 1L, , drop = FALSE]
           env$. <- env$.data <- cur_chunk
           for (k in seq_len(m)) {
               out[[k]][i + j] <<- list(overscope_eval_next(overscope, args[[k]]))
               p$tick()$print()
           }
       }
       i <<- i + (n - 1)
   }) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/do.r:54
12: callback(chunk) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/query.r:39

── 2. Error: unnamed results bound together by row (@test-do.R#25)  ────────────
argument must be coercible to non-negative integer
1: mf %>% do(head(., 1)) at testthat/test-do.R:25
2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
3: eval(quote(`_fseq`(`_lhs`)), env, env)
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: `_fseq`(`_lhs`)
6: freduce(value, `_function_list`)
7: withVisible(function_list[[k]](value))
8: function_list[[k]](value)
9: do(., head(., 1))
10: do.tbl_sql(., head(., 1)) at /Users/romain/git/tidyverse/dplyr/R/do.r:91
11: query$fetch_paged(.chunk_size, function(chunk) {
       if (!is_null(last_group)) {
           chunk <- rbind(last_group, chunk)
       }
       grouped <- chunk %>% group_by(!!!syms(names(chunk)[gvars]))
       index <- attr(grouped, "indices")
       n <- length(index)
       last_group <<- chunk[index[[length(index)]] + 1L, , drop = FALSE]
       for (j in seq_len(n - 1)) {
           cur_chunk <- chunk[index[[j]] + 1L, , drop = FALSE]
           env$. <- env$.data <- cur_chunk
           for (k in seq_len(m)) {
               out[[k]][i + j] <<- list(overscope_eval_next(overscope, args[[k]]))
               p$tick()$print()
           }
       }
       i <<- i + (n - 1)
   }) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/do.r:54
12: callback(chunk) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/query.r:39

── 3. Error: Results respect select (@test-do.R#37)  ───────────────────────────
argument must be coercible to non-negative integer
1: mf %>% select(x) %>% do(ncol = ncol(.)) at testthat/test-do.R:37
2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
3: eval(quote(`_fseq`(`_lhs`)), env, env)
4: eval(quote(`_fseq`(`_lhs`)), env, env)
5: `_fseq`(`_lhs`)
6: freduce(value, `_function_list`)
7: withVisible(function_list[[k]](value))
8: function_list[[k]](value)
9: do(., ncol = ncol(.))
10: do.tbl_sql(., ncol = ncol(.)) at /Users/romain/git/tidyverse/dplyr/R/do.r:91
11: query$fetch_paged(.chunk_size, function(chunk) {
       if (!is_null(last_group)) {
           chunk <- rbind(last_group, chunk)
       }
       grouped <- chunk %>% group_by(!!!syms(names(chunk)[gvars]))
       index <- attr(grouped, "indices")
       n <- length(index)
       last_group <<- chunk[index[[length(index)]] + 1L, , drop = FALSE]
       for (j in seq_len(n - 1)) {
           cur_chunk <- chunk[index[[j]] + 1L, , drop = FALSE]
           env$. <- env$.data <- cur_chunk
           for (k in seq_len(m)) {
               out[[k]][i + j] <<- list(overscope_eval_next(overscope, args[[k]]))
               p$tick()$print()
           }
       }
       i <<- i + (n - 1)
   }) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/do.r:54
12: callback(chunk) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/query.r:39

── 4. Error: results independent of chunk_size (@test-do.R#52)  ────────────────
argument must be coercible to non-negative integer
1: expect_equal(nrows(mf, 1), c(1, 2, 3)) at testthat/test-do.R:52
2: quasi_label(enquo(object), label)
3: eval_bare(get_expr(quo), get_env(quo))
4: nrows(mf, 1)
5: unlist(do(group, nrow = nrow(.), .chunk_size = n)$nrow) at testthat/test-do.R:49
6: do(group, nrow = nrow(.), .chunk_size = n)
7: do.tbl_sql(group, nrow = nrow(.), .chunk_size = n) at /Users/romain/git/tidyverse/dplyr/R/do.r:91
8: query$fetch_paged(.chunk_size, function(chunk) {
       if (!is_null(last_group)) {
           chunk <- rbind(last_group, chunk)
       }
       grouped <- chunk %>% group_by(!!!syms(names(chunk)[gvars]))
       index <- attr(grouped, "indices")
       n <- length(index)
       last_group <<- chunk[index[[length(index)]] + 1L, , drop = FALSE]
       for (j in seq_len(n - 1)) {
           cur_chunk <- chunk[index[[j]] + 1L, , drop = FALSE]
           env$. <- env$.data <- cur_chunk
           for (k in seq_len(m)) {
               out[[k]][i + j] <<- list(overscope_eval_next(overscope, args[[k]]))
               p$tick()$print()
           }
       }
       i <<- i + (n - 1)
   }) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/do.r:54
9: callback(chunk) at /Users/romain/git/release/dplyr/revdep/checks.noindex/dbplyr/new/dbplyr.Rcheck/00_pkg_src/dbplyr/R/query.r:39

── 5. Failure: n_groups drops zero-length groups (@test-group-size.R#37)  ──────
n_groups(grp) not equal to 3.
1/1 mismatches
[1] 4 - 3 == 1
tbl_df

── 6. Failure: summarise drops zero-length groups (@test-group-size.R#47)  ─────
nrow(res) not equal to 3.
1/1 mismatches
[1] 4 - 3 == 1
tbl_df

── 7. Failure: summarise drops zero-length groups (@test-group-size.R#48)  ─────
tail(res$n, n = 1) not equal to 10.
1/1 mismatches
[1] 0 - 10 == -10
tbl_df

── 8. Failure: summarise drops zero-length groups (@test-group-size.R#49)  ─────
is.nan(tail(res$mn, n = 1)) isn't false.
tbl_df

── 9. Failure: queries translate correctly (@test-translate-oracle.R#22)  ──────
mf %>% group_by\(x\) %>% tally %>% ungroup\(\) %>% tally\(\) %>% sql_render\(simulate_oracle\(\)\) does not match "^SELECT COUNT[(][*][)] AS `nn`\nFROM [(]SELECT `x`, COUNT[(][*][)] AS `n`\nFROM [(]`df`[)] \nGROUP BY `x`[)] `[^`]*`$".
Actual value: "SELECT SUM\(`n`\) AS `nn`\\nFROM \(SELECT `x`, COUNT\(\*\) AS `n`\\nFROM \(`df`\) \\nGROUP BY `x`\) `mdwpyuqwqj`"

══ testthat results  ═══════════════════════════════════════════════════════════
OK: 521 SKIPPED: 11 FAILED: 9
1. Error: named argument become list columns (@test-do.R#14) 
2. Error: unnamed results bound together by row (@test-do.R#25) 
3. Error: Results respect select (@test-do.R#37) 
4. Error: results independent of chunk_size (@test-do.R#52) 
5. Failure: n_groups drops zero-length groups (@test-group-size.R#37) 
6. Failure: summarise drops zero-length groups (@test-group-size.R#47) 
7. Failure: summarise drops zero-length groups (@test-group-size.R#48) 
8. Failure: summarise drops zero-length groups (@test-group-size.R#49) 
9. Failure: queries translate correctly (@test-translate-oracle.R#22) 

Error: testthat unit tests failed
In addition: Warning message:
call dbDisconnect() when finished working with a connection 
Execution halted

1 error ✖ | 0 warnings ✔ | 0 notes ✔

@hadley hadley added the bug label Jan 2, 2019

@hadley hadley added this to the v1.2.2 milestone Jan 2, 2019

hadley added a commit that referenced this issue Jan 3, 2019

Remove tests that are no longer true
And I have no idea what code this could have possible been exercising, since the factor levels are lost as soon as the data is copied to the database. #190

@hadley hadley closed this in 834d3f0 Jan 3, 2019

hadley added a commit that referenced this issue Jan 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment