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

Use TOP 100 PERCENT as stop-gap to allow subqueries with ORDER BY #277

Merged
merged 8 commits into from May 30, 2019

Conversation

@krlmlr
Copy link
Member

krlmlr commented Apr 9, 2019

for MSSQL.

Closes #275.

@hadley

This comment has been minimized.

Copy link
Member

hadley commented Apr 11, 2019

Re-building

krlmlr added 4 commits Apr 11, 2019
test_that("ORDER BY in subqueries uses TOP 100 PERCENT (#175)", {
mf <- lazy_frame(x = 1:3, con = simulate_mssql())

expect_equal(

This comment has been minimized.

Copy link
@hadley

hadley Apr 12, 2019

Member

Maybe it's better to use expect_known_output() here?

This comment has been minimized.

Copy link
@krlmlr

krlmlr Apr 14, 2019

Author Member

This code is consistent with the rest of the file. I filed #285 to address this.

@@ -103,7 +103,8 @@ sql_render.select_query <- function(query, con, ..., bare_identifier_ok = FALSE)
con, query$select, from, where = query$where, group_by = query$group_by,
having = query$having, order_by = query$order_by, limit = query$limit,
distinct = query$distinct,
...
...,

This comment has been minimized.

Copy link
@hadley

hadley Apr 12, 2019

Member

Since you touched this function, can you please put each of the other arguments on its own line?

This comment has been minimized.

Copy link
@krlmlr

krlmlr Apr 14, 2019

Author Member

Done. I kept the unnamed arguments on one line.

@hadley
hadley approved these changes Apr 16, 2019
Copy link
Member

hadley left a comment

Can you please add a bullet to NEWS? It should briefly describe the change and end with (@yourname, #issuenumber).

@hadley hadley merged commit 67df8b3 into tidyverse:master May 30, 2019
3 checks passed
3 checks passed
codecov/patch 100% of diff hit (target 83.49%)
Details
codecov/project 83.53% (+0.04%) compared to 56afe40
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@alexkyllo

This comment has been minimized.

Copy link

alexkyllo commented Jul 12, 2019

Azure Data Warehouse doesn't support TOP [...] PERCENT so this broke dbplyr for ADW.

Would it be feasible to emit this only when the subquery actually has an order by clause?

@tschager

This comment has been minimized.

Copy link

tschager commented Jul 24, 2019

Any workaround for Azure Data Warehouse besides sticking to an older version?

@filipwastberg

This comment has been minimized.

Copy link

filipwastberg commented Oct 17, 2019

This also breaks code where the connection is a Parallell Data Warehouse (PDW) with MSSQL, doesn't support top ... percent either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.