Skip to content
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

r/adbcdrivermanager: adbc_connection_get_objects() for temporary tables #1141

Closed
nbenn opened this issue Sep 30, 2023 · 1 comment · Fixed by #1603
Closed

r/adbcdrivermanager: adbc_connection_get_objects() for temporary tables #1141

nbenn opened this issue Sep 30, 2023 · 1 comment · Fixed by #1603
Assignees

Comments

@nbenn
Copy link
Collaborator

nbenn commented Sep 30, 2023

Ingesting tables as TEMPORARY works fine

library(adbcdrivermanager)

db <- adbc_database_init(adbcsqlite::adbcsqlite(), uri = ":memory:")
con <- adbc_connection_init(db)

write_adbc(datasets::swiss, con, "swiss", temporary = TRUE)

as.data.frame(read_adbc(con, "SELECT * from swiss WHERE Agriculture < 20"))
#>   Fertility Agriculture Examination Education Catholic Infant.Mortality
#> 1      80.2        17.0          15        12     9.96             22.2
#> 2      55.7        19.4          26        28    12.11             20.2
#> 3      54.3        15.2          31        20     2.15             10.8
#> 4      65.7         7.7          29        11    13.79             20.5
#> 5      72.7        16.7          22        13    11.22             18.9
#> 6      64.4        17.6          35        32    16.92             23.0
#> 7      67.6        18.7          25         7     8.65             19.5
#> 8      35.0         1.2          37        53    42.34             18.0

but listing via adbc_connection_get_objects() is less straightforward.

res <- nanoarrow::convert_array_stream(
  adbc_connection_get_objects(con)
)

res
#>   catalog_name catalog_db_schemas
#> 1         main                 NA

res[["catalog_db_schemas"]][[1L]]
#>   db_schema_name db_schema_tables
#> 1           <NA>

@paleolimbot Am I missing something? Should I be passing some value as table_type to have temporary tables included? The docs indicate that the default value NULL corresponds to "tables of any type".

Or is this an upstream issue?

@lidavidm
Copy link
Member

lidavidm commented Oct 2, 2023

The SQLite driver only looks at the "main" catalog (so you would also see this if you tried to attach a database)

lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
@lidavidm lidavidm self-assigned this Mar 14, 2024
@github-actions github-actions bot added this to the ADBC Libraries 0.11.0 milestone Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 14, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 15, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 19, 2024
lidavidm added a commit that referenced this issue Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants