Open krlmlr opened 11 months ago
Should we allow
infer_nanoarrow_schema()
on schema objects?
I was initially rather careful to separate as_nanoarrow_schema()
(i.e., I'm looking for a data type, get me that data type as a nanoarrow schema!) and infer_nanoarrow_schema()
(i.e., what would the schema be after I call as_nanoarrow_array()
on this thing). In R that's sort of confusing because we don't have data type objects (just zero-size vectors). At this point it seems like the lack of infer_nanoarrow_schema.nanoarrow_schema()
is just adding confusion? I don't think it would hurt to add it.
Should we allow
infer_nanoarrow_ptype()
on R objects, effectively emulating data roundtrip?
I think that would maybe be confusing...vec_ptype()
and infer_nanoarrow_ptype()
may potentially return different things. If it were added to nanoarrow I would prefer to call it ptype_after_roundtrip()
or something similarly descriptive. Or maybe DBI just wants to know if something will roundtrip or not?
Hm... I don't mind leaving this as is for a bit, it would just save a few lines of code. Going from strict to permissive is easy, but is it useful elsewhere? Let's see.
infer_nanoarrow_schema()
on schema objects?infer_nanoarrow_ptype()
on R objects, effectively emulating data roundtrip?For DBI.
Created on 2023-12-25 with reprex v2.0.2