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

check_na_rm() should warn with untranslated function names #153

Closed
yutannihilation opened this issue Sep 6, 2018 · 1 comment
Closed
Labels
feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL wip work in progress
Milestone

Comments

@yutannihilation
Copy link
Member

check_na_rm() warns like this, but apparently we cannot use AVG(x, na.rm = TRUE); I believe it should be mean(x, na.rm = TRUE).

But, I don't know how to pass the original name to check_na_rm()...

library(dplyr, warn.conflicts = FALSE)
library(dbplyr, warn.conflicts = FALSE)

result <- memdb_frame(x = 1) %>% 
  summarise(x = mean(x)) %>%
  collect()
#> Warning: Missing values are always removed in SQL.
#> Use `AVG(x, na.rm = TRUE)` to silence this warning

Created on 2018-09-06 by the reprex package (v0.2.0.9000).

sverchkov pushed a commit to sverchkov/dbplyr that referenced this issue Sep 6, 2018
@hadley hadley added feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL help wanted ❤️ we'd love your help! labels Jan 2, 2019
@hadley
Copy link
Member

hadley commented Jan 2, 2019

This requires an additional argument to check_na_rm()

@hadley hadley added wip work in progress and removed help wanted ❤️ we'd love your help! labels Jan 2, 2019
@hadley hadley added this to the v1.4.0 milestone Jan 9, 2019
@hadley hadley closed this as completed in db76b08 Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement func trans 🌍 Translation of individual functions to SQL wip work in progress
Projects
None yet
Development

No branches or pull requests

2 participants