dbplyr 2.3.1
Breaking changes
window_order()now only accepts bare symbols or symbols wrapped indesc().
This breaking change is necessary to allowselect()to drop and rename
variables used inwindow_order()(@mgirlich, #1103).
Improved error messages
-
quantile()andmedian()now error for SQL Server when used insummarise()
and for PostgreSQL when used inmutate()as they can't be properly
translated (@mgirlich, #1110). -
Added an informative error for unsupported join arguments
unmatchedand
multiple(@mgirlich). -
Using predicates, e.g.
where(is.integer), inacross()now produces an
error as they never worked anyway (@mgirlich, #1169). -
Catch unsupported argument
pivot_wider(id_expand = TRUE)and
pivot_longer(cols_vary)(@mgirlich, #1109).
Bug fixes in SQL generation
-
Fixed an issue when using a window function after a
summarise()and
select()(@mgirlich, #1104). -
Fixed an issue when there where at least 3 joins and renamed variables
(@mgirlich, #1101). -
mutate()andselect()afterdistinct()now again produce a subquery to
generate the correct translation (@mgirlich, #1119, #1141). -
Fixed an issue when using
filter()on a summarised variable (@mgirlich, #1128). -
mutate()+filter()now again produces a new query if themutate()
uses a window function or SQL (@mgirlich, #1135). -
across()andpick()can be used (again) indistinct()(@mgirlich, #1125). -
The
rows_*()function work again for tables in a schema in PostgreSQL
(@mgirlich, #1133).
Minor improvements and bug fixes
-
sql()now evaluates its arguments locally also when used inacross()(@mgirlich, #1039). -
The rank functions (
row_number(),min_rank(),rank(),dense_rank(),
percent_rank(), andcume_dist()) now support multiple variables by
wrapping them intibble(), e.g.rank(tibble(x, y))(@mgirlich, #1118). -
Added support for
join_by()added in dplyr 1.1.0 (@mgirlich, #1074). -
Using
by = character()to perform a cross join is now soft-deprecated in
favor ofcross_join(). -
full_join()andright_join()are now translated directly toFULL JOIN
andRIGHT JOINfor SQLite as native support was finally added (@mgirlich, #1150). -
case_match()now works with strings on the left hand side (@mgirlich, #1143). -
The rank functions (
row_number(),min_rank(),rank(),dense_rank(),
percent_rank(), andcume_dist()) now work again for variables wrapped in
desc(), e.g.row_number(desc(x))(@mgirlich, #1118). -
Moved argument
auto_indexafter...in*_join()(@mgirlich, #1115). -
across()now uses the original value when a column is overriden to match
the behaviour of dplyr. For examplemutate(df, across(c(x, y), ~ .x / x))
now producesSELECT `x` / `x` AS `x`, `y` / `x` AS `y` FROM `df`instead of
SELECT `x`, `y` / `x` AS `y` FROM ( SELECT `x` / `x` AS `x`, `y` FROM `df` ) -
Restricted length of table aliases to avoid truncation on certain backends (e.g., Postgres) (@fh-mthomson, #1096)