dplyr::arrange()
with the .by_group=TRUE
parameter set produces SQL with an error
#115
Labels
bug
an unexpected problem or unintended behavior
verb trans 🤖
Translation of dplyr verbs to SQL
wip
work in progress
Milestone
@CerebralMastication commented on Apr 15, 2018, 1:56 PM UTC:
This is a cross post from the RStats Community, where I initially posted it: https://community.rstudio.com/t/dplyr-arrange-by-group-true-fails-with-sql-backend/7232
I've either got a misunderstanding or a bug... I think it's a bug.
It seems that
dplyr::arrange()
with the.by_group=TRUE
parameter set produces SQL with an error. Here's how to reprex it:On the DB (Redshift in my case) set up a dummy table:
Then from
R
(presuming a connection to the DB calledcon
and already loadeddbplyr
which generates the following SQL:
which fails if I try to
collect(out_test)
with the following error:the rub seems to be the
,TRUE
there at the end. If I remove it, I get the followable runnable SQL:My guess is that the routine that generates the SQL has a glitch. Looks like it's just passing
, TRUE
instead of adding in thegroup by
variables.This issue was moved by krlmlr from tidyverse/dplyr/issues/3515.
The text was updated successfully, but these errors were encountered: