Very similar issue to #379 and (I assume) the associated fix at #388. Casting a string, using as.numeric() and as.double() in Redshift coerces to an integer.
Given a column x, with the string "0.88", the output value is 0. The SQL translation is CAST("x" AS NUMERIC) in both cases.
Using sql('cast(x AS DOUBLE PRECISION)') or sql('cast(x AS FLOAT)') directly outputs the expected 0.88
Very similar issue to #379 and (I assume) the associated fix at #388. Casting a string, using
as.numeric()andas.double()in Redshift coerces to an integer.Given a column
x, with the string"0.88", the output value is 0. The SQL translation isCAST("x" AS NUMERIC)in both cases.Using
sql('cast(x AS DOUBLE PRECISION)')orsql('cast(x AS FLOAT)')directly outputs the expected0.88