-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use blob::blob()
class instead of bare list(raw)
#115
Comments
What are the advantages of this? Isn't it a problem that you'll get different behavior if the blob package is not installed? Or would you make this opt-in? |
When type mapping with something like Arrow, which allows nested types, it may not be possible to distinguish whether
I think the same can be said about For reference, nanoarrow behaves as follows: nanoarrow::infer_nanoarrow_schema(list(raw()))
#> <nanoarrow_schema binary>
#> $ format : chr "z"
#> $ name : chr ""
#> $ metadata : list()
#> $ flags : int 2
#> $ children : list()
#> $ dictionary: NULL
nanoarrow::infer_nanoarrow_schema(blob::blob())
#> <nanoarrow_schema binary>
#> $ format : chr "z"
#> $ name : chr ""
#> $ metadata : list()
#> $ flags : int 2
#> $ children : list()
#> $ dictionary: NULL
nanoarrow::as_nanoarrow_array(list(raw())) |>
as.vector()
#> <blob[1]>
#> [1] blob[0 B] Created on 2025-02-10 with reprex v2.1.1 Without nanoarrow::as_nanoarrow_array(list(raw())) |>
as.vector()
#> [[1]]
#> raw(0)
#>
#> attr(,"ptype")
#> raw(0)
#> attr(,"class")
#> [1] "blob" "vctrs_list_of" "vctrs_vctr" "list" Created on 2025-02-10 with reprex v2.1.1 |
Indeed! I am trying to understand if adding these "very soft" types is useful at all, and how much confusion it causes. I wonder if nanoparquet should auto-load the corresponding package when it adds an hms, blob, etc. column. And if that package is not installed then maybe give a warning? Or a message? |
I think it makes sense to show warnings if they are not installed when using |
Currently
nanoparquet
seems to map some types of Parquet tolist(raw)
in R.I think it would be worthwhile to use
blob
vectors instead of a list of raw vectors, asnanoarrow
and others have done.The text was updated successfully, but these errors were encountered: