This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
[request] support for integer64 from bit64 package #2
Comments
We will add this at some point. The workaround now is a CAST to string before the result column is handed over. |
Want to give it a try? I'd be happy to review a PR. |
Can'r promise, but mb will try to create PR this weekend. |
Okay, I did this in the end, this should work (with the library(bit64)
library(DBI)
con <- dbConnect(MonetDBLite::MonetDBLite())
options(monetdb.int64=T)
a <- data.frame(a=as.integer64(c(42, NA, 4294967294)))
dbWriteTable(con, "a", a)
print(res <- dbGetQuery(con, "SELECT * from a"))
print(str(res)) The monetdb.int64 option enables the writing of bit64 integer64 vectors as BIGINT and the conversion of results of BIGINT to integer64 R vectors. Is this what you expected? |
Referencing a DBI issue on the topic here: r-dbi/DBI#248 |
Awesome! I will test and report back. |
@hannesmuehleisen works perfectly. Many thanks! |
Extended to support library(bit64)
library(DBI)
con <- dbConnect(MonetDBLite::MonetDBLite(), bigint="integer64")
a <- data.frame(a=as.integer64(c(42, NA, 4294967294)))
dbWriteTable(con, "a", a)
print(res <- dbGetQuery(con, "SELECT * from a"))
print(str(res)) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Would be great to have support for mapping of R's
bit64::integer64
to monetdbBIGINT
. (I believe this is quite simple sincebit64::integer64
is justlong long
and I'm pretty sure same asBIGINT
)I can't find a solution how to keep
integer64
. Is there any workaround?The text was updated successfully, but these errors were encountered: