dbExistsTable(conn, Id(schema = "SESSION", table = "MY_TEMP"))
throws
Error in `$<-.data.frame`(`*tmp*`, table_remarks, value = NA_character_) :
replacement has 1 row, data has 0
Calls: print ... tryCatchList -> tryCatchOne -> doTryCatch -> $<- -> $<-.data.frame`
in version 1.6.0 when applied to DB2 global temporary tables (SESSION.* tables).
In version 1.5.0 dbExistsTable returns FALSE in the same scenario.
Please refer to https://github.com/nattomi/odbc-dbexiststable-issue for a reproducible example.
Whether dbExistsTable should theoretically return FALSE or TRUE is not quite clear, because temporary tables are also not visible in the system catalog (syscat,tables). However, it should definitely not throw.