You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The addition of an unconditional call to unname() in compute.tbl_sql() added in #793 breaks use of schemas and catalogs, since both dbplyr::in_schema() and dbplyr::in_catalog() rely on names to identify the parts of the table identifier. Once the names are removed, a schema-qualified table name always renders as "NULL.NULL" (and similarly for catalog-schema-qualified tables).
require(dplyr)
require(RSQLite)
db<-DBI::dbConnect(SQLite(), ':memory:')
schematized<-dbplyr::in_schema('test', 'this')
# Create a table to select and computemtcars %>% slice_head(n=5) %>% copy_to(db, ., name='this')
thistbl<- tbl(db, 'this')
#Bangthistbl %>% compute(name=schematized)
yields Error: near "NULL": syntax error
A minimal fix would be to preserve names in cases we know they'll be needed:
if (!any(class(name) %in% c('dbplyr_schema', 'dbplyr_catalog'))) name <- unname(name)
The text was updated successfully, but these errors were encountered:
The addition of an unconditional call to
unname()
incompute.tbl_sql()
added in #793 breaks use of schemas and catalogs, since bothdbplyr::in_schema()
anddbplyr::in_catalog()
rely on names to identify the parts of the table identifier. Once the names are removed, a schema-qualified table name always renders as "NULL.NULL" (and similarly for catalog-schema-qualified tables).yields
Error: near "NULL": syntax error
A minimal fix would be to preserve names in cases we know they'll be needed:
The text was updated successfully, but these errors were encountered: