-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviordplyr verbs 🤖Translation of dplyr verbs to SQLTranslation of dplyr verbs to SQL
Milestone
Description
library( dplyr, warn.conflicts = F )
df_tib <- tibble( a=c(1,1,2,2), b=c(1,2,1,2) )
df_sql <- dbplyr::memdb_frame( a=c(1,1,2,2), b=c(1,2,1,2) )
df_tib %>% distinct( x = a )
#> # A tibble: 2 x 1
#> x
#> <dbl>
#> 1 1
#> 2 2
res <- df_sql %>% distinct( x = a )
res %>% show_query()
#> <SQL>
#> SELECT `x`
#> FROM `bigofxlnjv`
#> GROUP BY `x`
res
#> Error in result_create(conn@ptr, statement): no such column: xCreated on 2018-09-06 by the reprex
package (v0.2.0).
I think the correct translation is SELECT DISTINCT "a" AS "x".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviordplyr verbs 🤖Translation of dplyr verbs to SQLTranslation of dplyr verbs to SQL