Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Admin_mschuemi authored and Admin_mschuemi committed Dec 17, 2024
1 parent 514d535 commit 8acd773
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions R/CtasHack.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ ctasHack <- function(connection, sqlTableName, tempTable, sqlFieldNames, sqlData
inform(paste("Inserting data took", signif(delta, 3), attr(delta, "units")))
}

multiValuesInsert <- function(connection, sqlTableName, tempTable, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema) {
multiValuesInsert <- function(connection, sqlTableName, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema) {
logTrace(sprintf("Inserting %d rows into table '%s' using multi-values inserts", nrow(data), sqlTableName))

assign("noLogging", TRUE, envir = globalVars)
Expand Down Expand Up @@ -216,4 +216,3 @@ multiValuesInsert <- function(connection, sqlTableName, tempTable, sqlFieldNames
delta <- Sys.time() - startTime
inform(paste("Inserting data took", signif(delta, 3), attr(delta, "units")))
}

2 changes: 1 addition & 1 deletion R/InsertTable.R
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ insertTable.default <- function(connection,
# Inserting using CTAS hack ----------------------------------------------------------------
ctasHack(connection, sqlTableName, tempTable, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema)
} else if (dbms == "spark") {
multiValuesInsert(connection, sqlTableName, tempTable, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema)
multiValuesInsert(connection, sqlTableName, sqlFieldNames, sqlDataTypes, data, progressBar, tempEmulationSchema)
} else {
# Inserting using SQL inserts --------------------------------------------------------------
logTrace(sprintf("Inserting %d rows into table '%s'", nrow(data), sqlTableName))
Expand Down

0 comments on commit 8acd773

Please sign in to comment.