Skip to content

Optimise more nested selects #213

@hadley

Description

@hadley
library(dplyr, warn.conflicts = FALSE)
iris_db <- dbplyr::tbl_lazy(iris)
iris_db %>% 
  select(2:1) %>% 
  select(2:1) %>% 
  select(2:1) %>% 
  show_query()
#> <SQL> SELECT "Sepal.Width", "Sepal.Length"
#> FROM (SELECT "Sepal.Length", "Sepal.Width"
#> FROM (SELECT "Sepal.Width", "Sepal.Length"
#> FROM "df") "dbplyr_tulvyudlkv") "dbplyr_szhyvbpgox"

Created on 2019-01-10 by the reprex package (v0.2.1.9000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    dplyr verbs 🤖Translation of dplyr verbs to SQLfeaturea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions