paleolimbot commented on issue #3293: URL: https://github.com/apache/arrow-adbc/issues/3293#issuecomment-3314422482
Thanks for sharing! (And thanks @zeroshade for the ping from Community over Code in person!) This is probably not that hard to implement. The mapping on the read side is here: https://github.com/apache/arrow-adbc/blob/b206f251a08259466b0dafdfc5c3951550e1801e/c/driver/postgresql/postgres_type.h#L259-L262 ...and would need to have some metadata attached for the JSON extension type. The mapping for the write is here, although the way we map bulk inserts is currently only switching on the Arrow type. What it *should* do is switch on the existing Postgres type and create the appropriate COPY writer given the Arrow input. https://github.com/apache/arrow-adbc/blob/b206f251a08259466b0dafdfc5c3951550e1801e/c/driver/postgresql/postgres_type.h#L580-L596 > Can you give a minimal example of what you expect the driver to handle? (Note that for I/O, Postgres appears to use plain JSON, even for "JSONB" types.) Not quite: https://github.com/apache/arrow-adbc/blob/b206f251a08259466b0dafdfc5c3951550e1801e/c/driver/postgresql/copy/reader.h#L446-L449 The workaround you have here is roughly what I do to handle PostGIS geometry input: create the table first, then send a bulk insert with the binary it expects. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
