Skip to content

Type warnings on MySQL and dplyr::mutate #176

Open
@JohnMount

Description

@JohnMount

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 [[email protected]:/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’

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions