Open willshen99 opened 1 week ago
dbExistsTable always return FALSE for name type either character or in_schema.
dbCreateTable(con, 'iris', iris, use.one.query=T) dbExistsTable(con, 'iris') # FALSE dbExistsTable(con, in_schema('new_schema', 'iris')) #FALSE
Looked into the codes in dbExistsTable, the issue is that table and schema names are not rendered correctly https://github.com/prestodb/RPresto/blob/804c29aff1e2cdfa59c0691b406b6116988eaeff/R/dbExistsTable.R#L17-L28
The check sql executed is:
"\n SELECT COUNT(*) AS n\n FROM information_schema.columns\n WHERE\n table_catalog = 'hive' AND\n table_schema = 'default' AND\n table_name = 'NA'\n "
Package Version:
DBI: 1.2.3 dbplyr: 2.4.0 RPresto: 1.4.6.9000
This is a compatibility issue with DBI >= 1.2.0
DBI::dbUnquoteIdentifier starts to create Id() objects without component names after version 1.2.0, see this PR https://github.com/r-dbi/DBI/pull/422.
DBI::dbUnquoteIdentifier
Id()
dbExistsTable always return FALSE for name type either character or in_schema.
Looked into the codes in dbExistsTable, the issue is that table and schema names are not rendered correctly https://github.com/prestodb/RPresto/blob/804c29aff1e2cdfa59c0691b406b6116988eaeff/R/dbExistsTable.R#L17-L28
The check sql executed is:
Package Version: