Skip to content
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

Type warnings on MySQL and dplyr::mutate #176

Open
JohnMount opened this issue Nov 30, 2016 · 0 comments
Open

Type warnings on MySQL and dplyr::mutate #176

JohnMount opened this issue Nov 30, 2016 · 0 comments

Comments

@JohnMount
Copy link

This is likely related to #37 , but I can't get type warnings to stop when using RMySQL and dplyr::mutate together. Even placing dplyr::compute() in a suppressWarnings() doesn't help as the warning isn't generate until printing time (and the printing may be done by a user later, the computation I am modeling would be inside a package function).

Example:

library('dplyr')
my_db <- src_mysql('mysql','127.0.0.1',3306,'root','passwd')
d4 <- copy_to(my_db,data.frame(x=c(1,2,3,3)),'d4')
suppressWarnings(
  d4 %>% mutate(z=1) %>% compute() -> d4
)
print(d4)

 # Source:   query [?? x 2]
 # Database: mysql 5.6.34 [root@127.0.0.1:/mysql]
 #
 #       x     z
 #   <dbl> <dbl>
 # 1     1     1
 # 2     2     1
 # 3     3     1
 # 4     3     1
 # Warning message:
 # In .local(conn, statement, ...) :
 #   Decimal MySQL column 1 imported as numeric
> packageVersion('dplyr')
[1] ‘0.5.0’
> packageVersion('RMySQL')
[1] ‘0.10.9’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants