rsqlserver icon indicating copy to clipboard operation
rsqlserver copied to clipboard

Incorrect handling of null values

Open ruaridhw opened this issue 7 years ago • 0 comments

@agstudy, I've tried reproducing your example of NULL type handling and found two regressions:

  1. After the dbWriteTable call, the uploaded table contains NULLs in the value column but not in the txt column of the database's table which instead contain blank cells. This can be verified by inspecting the table using means other than rsqlserver.
  2. Using the dbSendQuery and dbReadTable functions, the results are that the txt column returns NAs and the value column returns 0s

Essentially the problems here are that

  1. DB Integer nulls are converted to 0s in R
  2. DB text blanks are converted to NAs in R
  3. R text NAs are converted to blanks in DB

Are you able to reproduce this error on Windows using the current master branch or is this just a mono-specific error?

ruaridhw avatar Jan 06 '18 01:01 ruaridhw