Closed ericaVoss closed 2 years ago
As described in the SqlRender
documentation, it is preferred to use the CONCAT()
function when concatenating strings. However, SqlRender
should have been able to handle this situation, as there are ample cues the values that are being 'summed' are strings. The rules for this were simply missing for BigQuery (but are present for other SQL dialects).
I've added some rules to the BigQuery translation that corrects this. This currently lives in the develop branch of SqlRender
. Let me know if you want to use it. (You'd need to modify the renv.lock file).
@ericaVoss and @schuemie wouldnt it be simpler to just change the one line in the SQL? vs relying on develop branch of SqlRender?
I agree with @gowthamrao , using CONCAT() is a simpler update for me to make.
But I +1 the BigQuery update, Michael Kahn will be happy. :)
https://github.com/ohdsi-studies/Covid19SubjectsAesiIncidenceRate/blob/master/inst/sql/sql_server/subgroup/S1AgeGroupByGender.sql#L42
There is an errorwith using the “+” operator for string concatenation. BigQuery uses concat(……). SQLRender expects concat() (see https://ohdsi.github.io/SqlRender/articles/UsingSqlRender.html) so the distributed code is not conformant to SQLRender.
Related to: https://github.com/ohdsi-studies/Covid19VaccineAesiIncidenceRate/issues/9