hannes / MonetDBLite

MonetDB reconfigured as a library
108 stars 11 forks source link

Fix bug for reading in integer Dates from R #175

Closed mclements closed 7 years ago

mclements commented 7 years ago

I found this bug when (a) reading a file from Stata to R using read.dta() and then (b) writing from R to MonetDBLite using dbWriteTable(). A minimal test:

library(DBI) library(MonetDBLite) dbpath <- tempdir() con <- dbConnect(MonetDBLite::MonetDBLite(), dbpath) dbWriteTable(con, "test_double_date", data.frame(double_date=structure(1,class="Date")), overwrite=TRUE) dbWriteTable(con, "test_integer_date", data.frame(integer_date=structure(1L,class="Date")), overwrite=TRUE) dbDisconnect(con)