You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "WillAyd (via GitHub)" <gi...@apache.org> on 2023/05/15 22:37:34 UTC
[GitHub] [arrow-adbc] WillAyd commented on a diff in pull request #679: feat(c/driver/postgres): Implement GetObjectsDbSchemas for Postgres
WillAyd commented on code in PR #679:
URL: https://github.com/apache/arrow-adbc/pull/679#discussion_r1194426830
##########
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:
AFACIT those implementations generate maps that relate a table to a schema. I'm guessing elsewhere in the FlightSQL code base is where that mapping gets generated back into an Arrow structure. Any pointers on where I should look for that?
Generally I am unsure I have the right idea of how this is all supposed to be laid out. For example, if we have the following setup in the database:
```json
[{
"catalog_name": "postgres",
"catalog_db_schema": [
{
"db_schema_name": "public",
"db_schema_tables": [...],
},
{
"db_schema_name": "template0",
"db_schema_tables": [...],
},
{
"db_schema_name": "template1",
"db_schema_tables": [...],
},
}]
}]
```
Am I supposed to access the value of "public" via `reader->array_view->children[1][0]->children[0]`? I have a feeling the `children[1][0]` access is incorrect and there should be a way to extract the list element by index from an array via nanoarrow, but didn't see such a function.
Is that something that needs to be implemented upstream or do I have the wrong mental model?
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org