Closed judahrand closed 2 months ago
+1 here, this blocks us using the adbc postgres driver in ibis (which would be great, it removes a lot of very slow ingest hacks that we have)
Just spotted this and thought I'd leave some thoughts on how to do this (for me or the next person that gets here!):
We have support for the other direction (Postgres Array to List), and I don't think it is too hard to reverse engineer that:
...some test data that could be used to write a test:
...the test for the read direction:
I think the one thing that tripped me up when I took a look is that the array binary format includes the OID of the array elements. On read, we just ignore it, but we need to figure out the right OID to use on write (and I think none of the other writers need to care about OID).
It's possible Postgres ignores it too, though! Didn't test.
I just did a quick browse and I'm wondering if this method will help:
I think we need the reverse? Given the array OID find the child OID. (And in this case the array OID may not yet exist, if we're creating the table...maybe this is more complicated than it seems.)
With an up-to-date PostgresTypeResolver
I think that's:
...plus:
...but perhaps getting an up-to-date PostgresTypeResolver
is difficult here.
Aha. Thanks!
We can always plumb through the resolver but it seems like we should have enough info.
What feature or improvement would you like to see?
These types would include
List
,LargeList
,FixedSizeList
and could also includeFixedSizedTensor
.