WillAyd commented on code in PR #679:
URL: https://github.com/apache/arrow-adbc/pull/679#discussion_r1191785660
##########
c/driver/postgresql/connection.cc:
##########
@@ -182,7 +216,12 @@ AdbcStatusCode PostgresConnectionGetObjectsImpl(
if (depth == ADBC_OBJECT_DEPTH_CATALOGS) {
CHECK_NA(INTERNAL, ArrowArrayAppendNull(catalog_db_schemas_col, 1),
error);
} else {
- return ADBC_STATUS_NOT_IMPLEMENTED;
+ if (depth >= ADBC_OBJECT_DEPTH_DB_SCHEMAS) {
+ RAISE_ADBC(PostgresConnectionGetSchemasImpl(conn, depth,
Review Comment:
Here we are grabbing the associated schemas in a loop, but this brings up a
structural question. I assume from the adbc.h header that GetInfo should
maintain a hierarchy from catalog -> schema -> table -> constraints, etc...
However, the current implementation (shared with sqlite) creates the overall
array structure in a call to `AdbcInitConnectionObjectsSchema`; at face value I
don't see how this preserves the hierarchy between elements. With this
expression in a loop, it ends up writing the schema name for as many databases
as exist.
I could move it out of the loop to fix that, but figured I'd ask about the
hierarchical intent of the result before going too far
--
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]