{"action":"created","issue":{"url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/15","repository_url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R","labels_url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/15/comments","events_url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/15/events","html_url":"https://github.com/hannesmuehleisen/MonetDBLite-R/issues/15","id":292074187,"number":15,"title":"Weird arithmetic (types?)","user":{"login":"tslumley","id":8380349,"avatar_url":"https://avatars3.githubusercontent.com/u/8380349?v=4","gravatar_id":"","url":"https://api.github.com/users/tslumley","html_url":"https://github.com/tslumley","followers_url":"https://api.github.com/users/tslumley/followers","following_url":"https://api.github.com/users/tslumley/following{/other_user}","gists_url":"https://api.github.com/users/tslumley/gists{/gist_id}","starred_url":"https://api.github.com/users/tslumley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tslumley/subscriptions","organizations_url":"https://api.github.com/users/tslumley/orgs","repos_url":"https://api.github.com/users/tslumley/repos","events_url":"https://api.github.com/users/tslumley/events{/privacy}","received_events_url":"https://api.github.com/users/tslumley/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-01-27T00:53:43Z","updated_at":"2018-02-07T11:25:22Z","closed_at":null,"author_association":"NONE","body":"The following code\r\n\r\n```\r\nlibrary(dplyr)\r\ndbdir <- file.path(tempdir(), \"dplyrdir\")\r\nmy_db <- MonetDBLite::src_monetdblite(dbdir)\r\nmy_iris  <- copy_to(my_db, iris)\r\nmy_iris <- mutate(my_iris, set=ifelse(Species==\"setosa\",1,0))\r\nmy_iris %>% mutate(x= (set-.3)/987654321) %>% summarise(min(x),max(x)) %>% collect()\r\n```\r\n\r\ngives zero for the maximum and minimum (the entire column `x` is equal to zero).  Since both `set` and `x` show up as double when `my_iris` is printed, `x` should be non-zero floating point numbers.\r\n\r\nI suspect this is related to something I don't have a minimal example of, where I'm getting math overflow errors in summing a (quite long) column of numbers that should also be double."},"comment":{"url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/comments/363740046","html_url":"https://github.com/hannesmuehleisen/MonetDBLite-R/issues/15#issuecomment-363740046","issue_url":"https://api.github.com/repos/hannesmuehleisen/MonetDBLite-R/issues/15","id":363740046,"user":{"login":"hannesmuehleisen","id":227792,"avatar_url":"https://avatars3.githubusercontent.com/u/227792?v=4","gravatar_id":"","url":"https://api.github.com/users/hannesmuehleisen","html_url":"https://github.com/hannesmuehleisen","followers_url":"https://api.github.com/users/hannesmuehleisen/followers","following_url":"https://api.github.com/users/hannesmuehleisen/following{/other_user}","gists_url":"https://api.github.com/users/hannesmuehleisen/gists{/gist_id}","starred_url":"https://api.github.com/users/hannesmuehleisen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannesmuehleisen/subscriptions","organizations_url":"https://api.github.com/users/hannesmuehleisen/orgs","repos_url":"https://api.github.com/users/hannesmuehleisen/repos","events_url":"https://api.github.com/users/hannesmuehleisen/events{/privacy}","received_events_url":"https://api.github.com/users/hannesmuehleisen/received_events","type":"User","site_admin":false},"created_at":"2018-02-07T11:25:22Z","updated_at":"2018-02-07T11:25:22Z","author_association":"OWNER","body":"I think we should default to `DOUBLE` instead of `DECIMAL` for constants. I have pushed a patch. With it, the example you provided produces the following result:\r\n\r\n````\r\n# A tibble: 1 x 2\r\n         `min(x)`       `max(x)`\r\n            <dbl>          <dbl>\r\n1 -0.000000000304 0.000000000709\r\n````\r\n\r\nBetter?"}}
{"actor":{"display_login":"hannesmuehleisen"}}