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

Add support for int64 results #6

Open
edgararuiz-zz opened this issue Dec 21, 2017 · 7 comments
Open

Add support for int64 results #6

edgararuiz-zz opened this issue Dec 21, 2017 · 7 comments

Comments

@edgararuiz-zz
Copy link
Owner

> tbl(con, in_schema("datawarehouse", "flight")) %>%
+     group_by(month) %>%
+     tally() %>%
+     collect() 
# A tibble: 12 x 2
   month               n
   <dbl> <S3: integer64>
 1    10          556205
 2     4          598126
 3    12          544958
 4     5          606293
 5     2          569236
 6     7          627931
@quartin
Copy link

quartin commented Apr 11, 2018

Hi, I'm having the following problem (using dbplot_0.2.1.9000), which seems related to this issue:

> calls_ntiles_filter %>% 
+   head() %>% 
+   collect()
# A tibble: 6 x 2
  total_duration waiting_time
           <int>        <int>
1            161           72
2            141           72
3             93           72
4            634           72
5             71           72
6            410           72

> calls_ntiles_filter %>% 
+   dbplot_histogram(x = waiting_time)
Don't know how to automatically pick scale for object of type integer64. Defaulting to continuous.
Warning message:
Removed 29 rows containing missing values (position_stack). 

screen shot 2018-04-11 at 4 13 37 pm

Any thoughts on why this is happening?

@quartin
Copy link

quartin commented Apr 11, 2018

After looking at the PR that fixed this and later commits, seems this has been reverted?
edgararuiz@62be8b9#diff-e6b4f46f89e561a9db5fb9d2d83e8f26L47

@edgararuiz-zz
Copy link
Owner Author

Hi, thanks for reporting this. The reason why I reverted it is that I'm deferring the solution to ggplot2: tidyverse/ggplot2#2377

I may need to revert and add the work around until the fix is applied in ggplot2

@henningsway
Copy link

What is the suggested workaround for now, when the dataset is too big to be pulled into memory (and therefore cannot be coereced to numeric in R?)?

Temporarily transform the type of the column in the database via some sql command maybe?

@edgararuiz-zz
Copy link
Owner Author

Hi, you can use the corresponding db_ function in dbplot, which returns a regular data.frame, coerce that, and then pipe into a plot. Which plot are you trying to build?

@edgararuiz-zz edgararuiz-zz reopened this Jun 28, 2018
@edgararuiz-zz
Copy link
Owner Author

@quartin / @henningsway - I reopened this issue because I just noticed that I may have inadvertently remove the temp fix I had to coerce automatically coerce the results.

@henningsway
Copy link

Hi, thanks for reporting this. The reason why I reverted it is that I'm deferring the solution to ggplot2: tidyverse/ggplot2#2377

I may need to revert and add the work around until the fix is applied in ggplot2

I think it would be really nice to be able to use the dbplot-plotting functions for int64-data, otherwise its less useful, if your database uses int64 types. I see, that handbuilding (computation, collect, coerce, plot) is an option, but it often takes four lines of code instead of one.

(And I suppose the dbplot-commands are more for the quick-analysis and general concept of "doing things in the database" anyways?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants