hannes / MonetDBLite

MonetDB reconfigured as a library
108 stars 11 forks source link

logical columns fail to maintain missings #106

Closed ajdamico closed 7 years ago

ajdamico commented 7 years ago

col1 row1 should be NA not 0. sqlite behaves as expected, monetdblite incorrectly coerces the NA to FALSE

library(DBI)

sdb <- dbConnect( RSQLite::SQLite() )
mdb <- dbConnect( MonetDBLite::MonetDBLite() )

x <- data.frame( col1 = c( NA , TRUE ) , col2 = c( NA , "hello" ) , col3 = c( NA , 1 ) )

dbWriteTable( mdb , 'x' , x )
dbReadTable( mdb , 'x' )

dbWriteTable( sdb , 'x' , x )
dbReadTable( sdb , 'x' )
hannes commented 7 years ago

this goes wrong on the dbWriteTable part, works fine when using INSERT INTO

ajdamico commented 7 years ago

i assume it's somehow related to https://github.com/rstats-db/DBI/issues/152

hannes commented 7 years ago

nah this is my fault fixing it atm

ajdamico commented 7 years ago

thanks bud