meztez / bigrquerystorage

R Client for BigQuery Storage API
Apache License 2.0
19 stars 3 forks source link

bigint no longer respected? #62

Closed hadley closed 1 month ago

hadley commented 1 month ago
library(bigrquery)

x <- c("-2147483648", "-2147483647", "-1", "0", "1", "2147483647", "2147483648")
sql <- paste0("SELECT * FROM UNNEST ([", paste0(x, collapse = ","), "]) AS x");
qry <- bq_project_query(bq_test_project(), sql)
df <- bigrquerystorage::bqs_table_download(qry, bigint = "integer64")
str(df)
#> 'data.frame':    7 obs. of  1 variable:
#>  $ x: num  -2.15e+09 -2.15e+09 -1.00 0.00 1.00 ...

Created on 2024-09-20 with reprex v2.1.0

Possibly because of the change to use nanoarrow?

meztez commented 1 month ago

Yeah, nanoarrow is giving me a headache, it does not support all data type. Fun times.

meztez commented 1 month ago

Should be fixed when I merge #64. There was issue in the postprocess and in the manner nanoarrow convert BigQuery large int vs arrow.