Fixes for upcoming dbplyr 2.6.0 release#334
Open
hadley wants to merge 2 commits intoprestodb:masterfrom
Open
Conversation
Reviewer's GuideUpdates Presto dbplyr integration to align with dbplyr 2.6.0 API changes by replacing deprecated helpers, adjusting SQL wrapping for field discovery, updating compute.tbl_presto table construction, and modernizing test expectations and helper usage. Sequence diagram for updated sql_query_fields.PrestoConnection SQL wrappingsequenceDiagram
participant PrestoConnection
participant sql_query_fields_PrestoConnection
participant dbplyr
PrestoConnection->>sql_query_fields_PrestoConnection: sql_query_fields(con, sql)
sql_query_fields_PrestoConnection->>dbplyr: sql_query_wrap(con, sql)
dbplyr-->>sql_query_fields_PrestoConnection: wrapped_sql
sql_query_fields_PrestoConnection->>dbplyr: build_sql("SELECT * FROM ", wrapped_sql, " WHERE 1 = 0", con = con)
dbplyr-->>sql_query_fields_PrestoConnection: sql_query
sql_query_fields_PrestoConnection-->>PrestoConnection: sql_query
Flow diagram for updated compute.tbl_presto pipelineflowchart TD
A["compute.tbl_presto called with tbl_presto x"] --> B["Resolve name and temporary flags"]
B --> C["Call dbplyr::remote_con(x)"]
C --> D["Construct dplyr::tbl(remote_con, from = name, vars = colnames(x))"]
D --> E["Apply dplyr::group_by with dbplyr::op_grps(x)"]
E --> F["Apply dbplyr::window_order with dbplyr::op_sort(x)"]
F --> G["Return grouped and ordered remote table"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The change from
dplyr::tbl(src = dbplyr::remote_src(x), ...)todplyr::tbl(dbplyr::remote_con(x), ...)alters the expected type of the first argument (src vs. connection); consider either guarding this with a dplyr/dbplyr version check or adding a brief comment explaining why this is safe across supported versions.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The change from `dplyr::tbl(src = dbplyr::remote_src(x), ...)` to `dplyr::tbl(dbplyr::remote_con(x), ...)` alters the expected type of the first argument (src vs. connection); consider either guarding this with a dplyr/dbplyr version check or adding a brief comment explaining why this is safe across supported versions.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Along with changes in tidyverse/dbplyr#1807
I'd really appreciate it if you could run your live tests too, just to make sure I haven't messed up anything else.