You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "nbenn (via GitHub)" <gi...@apache.org> on 2023/12/22 16:24:38 UTC
[I] r/adbcdrivermanager: round-tripping zero-length factor returns wrong type [arrow-adbc]
nbenn opened a new issue, #1400:
URL: https://github.com/apache/arrow-adbc/issues/1400
Using SQLite, we currently have
```r
library(adbcdrivermanager)
db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = ":memory:")
con <- adbc_connection_init(db)
write_adbc(iris[0L, ], con, "iris0")
write_adbc(iris, con, "iris")
str(as.data.frame(read_adbc(con, "SELECT Species from iris")))
#> 'data.frame': 150 obs. of 5 variables:
#> $ Species: chr "setosa" "setosa" "setosa" "setosa" ...
str(as.data.frame(read_adbc(con, "SELECT Species from iris0")))
#> 'data.frame': 0 obs. of 5 variables:
#> $ Species: num
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] r/adbcdrivermanager: round-tripping zero-length factor returns wrong type [arrow-adbc]
Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #1400:
URL: https://github.com/apache/arrow-adbc/issues/1400#issuecomment-1877243166
I think that's happening because the SQLite driver gets zero values and doesn't know what type to infer. I find it a little strange that the type it infers by default is a SQLite integer as opposed to a SQLite null, but I get what happened.
At some point there was talk of using `sqlite_decltype()` to parse out declared field type if it exists (i.e., avoid attempting to guess for the simple case where we already know the declared type), which would solve this particular example.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] r/adbcdrivermanager: round-tripping zero-length factor returns wrong type [arrow-adbc]
Posted by "krlmlr (via GitHub)" <gi...@apache.org>.
krlmlr commented on issue #1400:
URL: https://github.com/apache/arrow-adbc/issues/1400#issuecomment-1978032715
Related: #1591?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] r/adbcdrivermanager: round-tripping zero-length factor returns wrong type [arrow-adbc]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1400:
URL: https://github.com/apache/arrow-adbc/issues/1400#issuecomment-1877466595
https://github.com/apache/arrow-adbc/blob/ec68c9316f545a74b0942c7cd3ca7730a141ee3c/c/driver/sqlite/statement_reader.c#L740-L745
It always starts on INT64
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org