You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "nbenn (via GitHub)" <gi...@apache.org> on 2023/10/01 08:44:02 UTC

[GitHub] [arrow-adbc] nbenn opened a new issue, #1142: r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()`

nbenn opened a new issue, #1142:
URL: https://github.com/apache/arrow-adbc/issues/1142

   Going by the docs I was expecting that passing `depth = 4L` I get back schema info up to columns. 
   
   ```r
   library(adbcdrivermanager)
   db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = ":memory:")
   con <- adbc_connection_init(db)
   write_adbc(datasets::swiss, con, "swiss")
   
   res <- nanoarrow::convert_array_stream(
     adbc_connection_get_objects(con, 4L)
   )
   
   res[["catalog_db_schemas"]][[1L]][["db_schema_tables"]][[1L]]
   #>   table_name table_type table_columns table_constraints
   #> 1      swiss      table          NULL              NULL
   ```
   
   If I use default depth of `0L`, I get the expected info.
   
   @paleolimbot Is `3L` the largest "sensible" value? Maybe a warning for larger values would be helpful? Or maybe being a bit more clear about this in the docs? As things stand, it might be a bit misleading.


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()` [arrow-adbc]

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #1142:
URL: https://github.com/apache/arrow-adbc/issues/1142#issuecomment-1748929587

   ```
   /// \brief Return metadata on catalogs, schemas, tables, and columns.
   ///
   /// \see AdbcConnectionGetObjects
   #define ADBC_OBJECT_DEPTH_ALL 0
   /// \brief Return metadata on catalogs only.
   ///
   /// \see AdbcConnectionGetObjects
   #define ADBC_OBJECT_DEPTH_CATALOGS 1
   /// \brief Return metadata on catalogs and schemas.
   ///
   /// \see AdbcConnectionGetObjects
   #define ADBC_OBJECT_DEPTH_DB_SCHEMAS 2
   /// \brief Return metadata on catalogs, schemas, and tables.
   ///
   /// \see AdbcConnectionGetObjects
   #define ADBC_OBJECT_DEPTH_TABLES 3
   /// \brief Return metadata on catalogs, schemas, tables, and columns.
   ///
   /// \see AdbcConnectionGetObjects
   #define ADBC_OBJECT_DEPTH_COLUMNS ADBC_OBJECT_DEPTH_ALL
   ```
   
   I suppose I did this backwards. So you want `0`.


-- 
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


Re: [I] r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()` [arrow-adbc]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #1142:
URL: https://github.com/apache/arrow-adbc/issues/1142#issuecomment-1748916765

   I can't speak to this off the top of my head since the concept of a "catalog" is something that I have only recently run into. The first thing I would try is whether a value of `4L` works in the Postgres driver (which has seen a little more use than the sqlite driver).
   
   (I can also look into it in the next few days!)


-- 
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


Re: [I] r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()` [arrow-adbc]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot commented on issue #1142:
URL: https://github.com/apache/arrow-adbc/issues/1142#issuecomment-1768914270

   @nbenn Are any changes to ADBC required to get the information you need here?


-- 
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


Re: [I] r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()` [arrow-adbc]

Posted by "paleolimbot (via GitHub)" <gi...@apache.org>.
paleolimbot closed issue #1142: r/adbcdrivermanager: behavior of `depth` argument in `adbc_connection_get_objects()` 
URL: https://github.com/apache/arrow-adbc/issues/1142


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org