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

possible typo in error message for redshift translation of quantile() in mutate() #1571

Open
edward-burn opened this issue Jan 6, 2025 · 0 comments

Comments

@edward-burn
Copy link
Contributor

edward-burn commented Jan 6, 2025

In the below redshift example, I get an error that the function is not supported for PostgreSQL, but I suppose it should intead say redshift?

library(dplyr, warn.conflicts = FALSE)
library(dbplyr, warn.conflicts = FALSE)
lazy_frame(x = c(1,2), con = simulate_redshift()) %>% 
  mutate(
    q25 = quantile(x, 0.25, na.rm = TRUE),
    median = median(x, na.rm = TRUE),
    q75 = quantile(x, 0.75, na.rm = TRUE)) |> 
  show_query()
#> Error in `quantile()`:
#> ! Translation of `quantile()` in `mutate()` is not supported for
#>   PostgreSQL.
#> ℹ Use a combination of `summarise()` and `left_join()` instead:
#>   `df %>% left_join(summarise(<col> = quantile(x, 0.25, na.rm = TRUE)))`.

Created on 2025-01-06 with reprex v2.1.0

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

1 participant