Skip to content

Commit

Permalink
Update DuckDB 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAntico committed Jun 21, 2024
1 parent dfceed0 commit 10daa51
Show file tree
Hide file tree
Showing 14 changed files with 727 additions and 728 deletions.
3 changes: 1 addition & 2 deletions CombineResults_AggSum.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ data.table::setorderv(dt, cols = "variable", -1)

# Plot 1M Case
temp <- data.table::copy(dt)
temp <- temp[!c(46:60, 107:121, 168:183, 229:243, 290:304)]
temp <- temp[Experiment != "Total Runtime"]
temp <- temp[!c(46:61, 107:122, 168:183, 229:244, 290:305)]
temp <- temp[, list(`Total Run Time (secs)` = sum(`Time In Seconds`, na.rm = TRUE)), by = variable]
temp <- temp[order(`Total Run Time (secs)`)]
AutoPlots::Plot.Bar(
Expand Down
4 changes: 2 additions & 2 deletions CombineResults_Lags.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ datatable <- data.table::fread(paste0(Path, "BenchmarkResults_Lags.csv"))
polars <- data.table::fread(paste0(Path, "BenchmarkResultsPolars_Lags.csv"))
polars <- polars[, .SD, .SDcols = c("TimeInSeconds")]
duckdb <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Lags.csv"))
#duckdb <- duckdb[, .SD, .SDcols = c("TimeInSeconds")]
duckdb <- duckdb[, .SD, .SDcols = c("TimeInSeconds")]
pandas <- data.table::fread(paste0(Path, "BenchmarkResultsPandas_Lags.csv"))
pandas <- pandas[, .SD, .SDcols = c("TimeInSeconds")]
collapse <- data.table::fread(paste0(Path, "BenchmarkResultsCollapse_Lags.csv"))
Expand All @@ -14,7 +14,7 @@ collapse <- collapse[, .SD, .SDcols = c("TimeInSeconds")]
# Modify Column Names for Joining
data.table::setnames(datatable, "TimeInSeconds", "2_Datatable")
data.table::setnames(polars, "TimeInSeconds", "4_Polars")
#data.table::setnames(duckdb, "TimeInSeconds", "5_DuckDB")
data.table::setnames(duckdb, "TimeInSeconds", "5_DuckDB")
data.table::setnames(pandas, "TimeInSeconds", "3_Pandas")
data.table::setnames(collapse, "TimeInSeconds", "1_Collapse")

Expand Down
2 changes: 1 addition & 1 deletion CombineResults_Melt.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ data.table::setorderv(dt, cols = "variable", -1)
temp <- data.table::copy(dt)
temp <- temp[Experiment != "Total Runtime"]
temp <- temp[, list(`Total Run Time (secs)` = sum(`Time In Seconds`, na.rm = TRUE)), by = variable]
data.table::setorderv(temp, "variable", 1)
data.table::setorderv(temp, "Total Run Time (secs)", 1)
AutoPlots::Plot.Bar(
dt = temp,
PreAgg = TRUE,
Expand Down
97 changes: 51 additions & 46 deletions DuckDB/AggSum_DuckDB.R

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions DuckDB/Cast_DuckDB.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ rm(schema_info, ncores, query, table_name)

## 1M 2N 1D 0G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand All @@ -90,8 +90,8 @@ gc()

## 1M 2N 1D 1G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -120,8 +120,8 @@ gc()

## 1M 2N 1D 2G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -152,8 +152,8 @@ gc()

## 1M 2N 1D 3G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -186,8 +186,8 @@ gc()

## 1M 2N 1D 4G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -247,8 +247,8 @@ dbWriteTable(con, "bmdata10M", temp, overwrite = TRUE)
rm(data, temp)

BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand All @@ -275,8 +275,8 @@ gc()

## 10M 2N 1D 1G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -305,8 +305,8 @@ gc()

## 10M 2N 1D 2G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -337,8 +337,8 @@ gc()

## 10M 2N 1D 3G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -371,8 +371,8 @@ gc()

## 10M 2N 1D 4G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -430,8 +430,8 @@ table_name <- "bmdata100M"
dbWriteTable(con, "bmdata100M", temp, overwrite = TRUE)
rm(data, temp)
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand All @@ -458,8 +458,8 @@ gc()

## 100M 2N 1D 1G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -488,8 +488,8 @@ gc()

## 100M 2N 1D 2G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -520,8 +520,8 @@ gc()

## 100M 2N 1D 3G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down Expand Up @@ -554,8 +554,8 @@ gc()

## 100M 2N 1D 4G
BenchmarkResults <- data.table::fread(paste0(Path, "BenchmarkResultsDuckDB_Cast.csv"))
rts <- c(rep(1.1, 10))
for(i in 1:10) {
rts <- c(rep(1.1, 5))
for(i in 1:5) {
print(i)
start <- Sys.time()
dbExecute(con, "CREATE TABLE ans AS
Expand Down
Loading

0 comments on commit 10daa51

Please sign in to comment.