You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The SQL generation seems to have problems when combining renaming with the join_by(between()) clause.
The following SQL fails when executing on a backend (binding error): it complains that it cannot find column 'z'.
dbplyr seems to translate the first inequality correctly, while it does not apply the correct substitution for the second inequality.
library(dplyr)
#> #> Attache Paket: 'dplyr'#> Die folgenden Objekte sind maskiert von 'package:stats':#> #> filter, lag#> Die folgenden Objekte sind maskiert von 'package:base':#> #> intersect, setdiff, setequal, union
library(dbplyr)
#> #> Attache Paket: 'dbplyr'#> Die folgenden Objekte sind maskiert von 'package:dplyr':#> #> ident, sqlldf1<- tbl_lazy(tibble(x=1))
ldf2<- tbl_lazy(tibble(y=1))
ldf1|>
left_join(
ldf2|> rename(z=y),
join_by(between(x, z, z))
)
#> <SQL>#> SELECT `x`, `y` AS `z`#> FROM `df` AS `df_LHS`#> LEFT JOIN `df` AS `df_RHS`#> ON (`df_LHS`.`x` >= `df_RHS`.`y` AND `df_LHS`.`x` <= `df_RHS`.`z`)
#> <SQL>#> SELECT `x`, `y` AS `z`#> FROM `df` AS `df_LHS`#> LEFT JOIN `df` AS `df_RHS`#> ON (`df_LHS`.`x` >= `df_RHS`.`y` AND `df_LHS`.`x` <= `df_RHS`.`y`)
The text was updated successfully, but these errors were encountered:
The SQL generation seems to have problems when combining renaming with the
join_by(between())
clause.The following SQL fails when executing on a backend (binding error): it complains that it cannot find column 'z'.
dbplyr seems to translate the first inequality correctly, while it does not apply the correct substitution for the second inequality.
Created on 2025-01-22 with reprex v2.1.1
I expect
The text was updated successfully, but these errors were encountered: