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
stringr::str_flatten() is translated to STRING_AGG(), which (on MSSQL) removes NULLs by default.
Therefore the na.rm argument has been excluded from the translation.
Two problems:
On local data frames, na.rm = FALSE is the default, whereas from a DB we are effectively getting na.rm = TRUE behaviour by default. (It would need some reworking to make the dbplyr translation behave the same way as the standard function - and I am not suggesting it would be a good idea to do this.) Potentially an issue I could raise on the stringr repository as a documentation suggestion for str_flatten.
If you include na.rm in your function call it throws an error, as it is only expecting the string and collapse arguments. This is understandable. But I suggest instead of throwing an error it could more gracefully ignore the na.rm, displaying an informative warning or info message.
If the developer team are happy with my suggestion in 2., and it makes sense, then I can try to write a patch that displays a message for the user and does not error.
stringr::str_flatten()
is translated toSTRING_AGG()
, which (on MSSQL) removes NULLs by default.Therefore the
na.rm
argument has been excluded from the translation.Two problems:
na.rm = FALSE
is the default, whereas from a DB we are effectively gettingna.rm = TRUE
behaviour by default. (It would need some reworking to make the dbplyr translation behave the same way as the standard function - and I am not suggesting it would be a good idea to do this.) Potentially an issue I could raise on the stringr repository as a documentation suggestion for str_flatten.na.rm
in your function call it throws an error, as it is only expecting thestring
andcollapse
arguments. This is understandable. But I suggest instead of throwing an error it could more gracefully ignore the na.rm, displaying an informative warning or info message.If the developer team are happy with my suggestion in 2., and it makes sense, then I can try to write a patch that displays a message for the user and does not error.
The text was updated successfully, but these errors were encountered: