Glue 1.4.0 converts a vector containing NA_character_ to NULL when using * to collapse values, whereas 1.3.2 left NAs in place.
With 1.3.2:
> glue_sql("SELECT A FROM B WHERE B IN ({values*});", values= c(NA, "A","M","Q"), .con=dbConnect(RSQLite::SQLite(), ""))
<SQL> SELECT A FROM B WHERE B IN (NULL, 'A', 'M', 'Q');
With 1.4.0:
> library(glue)
> library(DBI)
> glue_sql("SELECT A FROM B WHERE B IN ({values*});", values= c(NA, "A","M","Q"), .con=dbConnect(RSQLite::SQLite(), ""))
<SQL> SELECT A FROM B WHERE B IN (NULL);
>
This occurred for me on R 3.5.3 Platform x86_64-wmingw32/x64 as well as on R 3.6.3 (2020-02-29) Platform: x86_64-apple-darwin15.6.0 (64-bit)
Is this a bug? This seems related to #115 amd #130