-
Notifications
You must be signed in to change notification settings - Fork 110
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
db2: Fix exception during temp table lookup #910
base: main
Are you sure you want to change the base?
Conversation
Closes #905 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making this happen! May also be worth a NEWS entry.
@@ -68,7 +68,9 @@ setMethod("odbcConnectionTables", c("DB2/AIX64", "character"), | |||
tryCatch({ | |||
dfTempTables <- dbGetQuery(conn, query) | |||
# NULL as colname is not well liked by DB2 it seems. Hack here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# NULL as colname is not well liked by DB2 it seems. Hack here. | |
# NULL as colname is not well liked by DB2 it seems. Hack here. (#905). |
This will provide a clickable link in RStudio/Positron, making for easier navigation to the relevant GitHub archaelogy.
@@ -68,7 +68,9 @@ setMethod("odbcConnectionTables", c("DB2/AIX64", "character"), | |||
tryCatch({ | |||
dfTempTables <- dbGetQuery(conn, query) | |||
# NULL as colname is not well liked by DB2 it seems. Hack here. | |||
dfTempTables$table_remarks <- NA_character_ | |||
if (nrow(dfTempTables)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (nrow(dfTempTables)) { | |
if (nrow(dfTempTables) > 0) { |
I admit that we don't apply this consistently throughout the repo, but I tend to prefer not leaning on the "positive number evaluates to TRUE" in if
statements" trick, and this seems to be the norm in the tidyverse.
Self explanatory.