-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat(c/driver/postgresql): Add support for bulk ingestion of list types #1882
Comments
+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: arrow-adbc/c/driver/postgresql/copy/reader.h Lines 446 to 532 in 573c113
...some test data that could be used to write a test: arrow-adbc/c/driver/postgresql/copy/postgres_copy_test_common.h Lines 129 to 140 in 573c113
...the test for the read direction: arrow-adbc/c/driver/postgresql/copy/reader.h Lines 446 to 532 in 573c113
|
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: arrow-adbc/c/driver/postgresql/postgres_type.h Lines 367 to 377 in 00f1526
|
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
...plus:
...but perhaps getting an up-to-date |
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
.The text was updated successfully, but these errors were encountered: