Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Nov 10, 2024
1 parent 3c5298e commit 5c3d091
Show file tree
Hide file tree
Showing 77 changed files with 636 additions and 636 deletions.
4 changes: 2 additions & 2 deletions R/tpch_raw_01.R
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ tpch_raw_01 <- function(con, experimental) {
rel2,
list(
duckdb$expr_comparison(
"<=",
list(
duckdb$expr_reference("l_shipdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1998-09-02"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1998-09-02"))
}
),
"<="
)
)
)
)
Expand Down
8 changes: 4 additions & 4 deletions R/tpch_raw_02.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ tpch_raw_02 <- function(con, experimental) {
rel4,
list(
duckdb$expr_comparison(
"==",
list(
duckdb$expr_reference("p_size"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(15, experimental = experimental)
} else {
duckdb$expr_constant(15)
}
),
"=="
)
),
duckdb$expr_function(
"grepl",
Expand Down Expand Up @@ -320,15 +320,15 @@ tpch_raw_02 <- function(con, experimental) {
rel18,
list(
duckdb$expr_comparison(
"==",
list(
duckdb$expr_reference("r_name"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant("EUROPE", experimental = experimental)
} else {
duckdb$expr_constant("EUROPE")
}
),
"=="
)
)
)
)
Expand Down
12 changes: 6 additions & 6 deletions R/tpch_raw_03.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ tpch_raw_03 <- function(con, experimental) {
rel2,
list(
duckdb$expr_comparison(
"<",
list(
duckdb$expr_reference("o_orderdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1995-03-15"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1995-03-15"))
}
),
"<"
)
)
)
)
Expand Down Expand Up @@ -70,15 +70,15 @@ tpch_raw_03 <- function(con, experimental) {
rel5,
list(
duckdb$expr_comparison(
"==",
list(
duckdb$expr_reference("c_mktsegment"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant("BUILDING", experimental = experimental)
} else {
duckdb$expr_constant("BUILDING")
}
),
"=="
)
)
)
)
Expand Down Expand Up @@ -187,15 +187,15 @@ tpch_raw_03 <- function(con, experimental) {
rel13,
list(
duckdb$expr_comparison(
">",
list(
duckdb$expr_reference("l_shipdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1995-03-15"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1995-03-15"))
}
),
">"
)
)
)
)
Expand Down
12 changes: 6 additions & 6 deletions R/tpch_raw_04.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ tpch_raw_04 <- function(con, experimental) {
rel2,
list(
duckdb$expr_comparison(
list(duckdb$expr_reference("l_commitdate"), duckdb$expr_reference("l_receiptdate")),
"<"
"<",
list(duckdb$expr_reference("l_commitdate"), duckdb$expr_reference("l_receiptdate"))
)
)
)
Expand Down Expand Up @@ -74,26 +74,26 @@ tpch_raw_04 <- function(con, experimental) {
rel6,
list(
duckdb$expr_comparison(
">=",
list(
duckdb$expr_reference("o_orderdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1993-07-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1993-07-01"))
}
),
">="
)
),
duckdb$expr_comparison(
"<",
list(
duckdb$expr_reference("o_orderdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1993-10-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1993-10-01"))
}
),
"<"
)
)
)
)
Expand Down
12 changes: 6 additions & 6 deletions R/tpch_raw_05.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ tpch_raw_05 <- function(con, experimental) {
rel4,
list(
duckdb$expr_comparison(
"==",
list(
duckdb$expr_reference("r_name"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant("ASIA", experimental = experimental)
} else {
duckdb$expr_constant("ASIA")
}
),
"=="
)
)
)
)
Expand Down Expand Up @@ -314,26 +314,26 @@ tpch_raw_05 <- function(con, experimental) {
rel25,
list(
duckdb$expr_comparison(
">=",
list(
duckdb$expr_reference("o_orderdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1994-01-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1994-01-01"))
}
),
">="
)
),
duckdb$expr_comparison(
"<",
list(
duckdb$expr_reference("o_orderdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1995-01-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1995-01-01"))
}
),
"<"
)
)
)
)
Expand Down
20 changes: 10 additions & 10 deletions R/tpch_raw_06.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,59 +34,59 @@ tpch_raw_06 <- function(con, experimental) {
rel2,
list(
duckdb$expr_comparison(
">=",
list(
duckdb$expr_reference("l_shipdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1994-01-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1994-01-01"))
}
),
">="
)
),
duckdb$expr_comparison(
"<",
list(
duckdb$expr_reference("l_shipdate"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(as.Date("1995-01-01"), experimental = experimental)
} else {
duckdb$expr_constant(as.Date("1995-01-01"))
}
),
"<"
)
),
duckdb$expr_comparison(
">=",
list(
duckdb$expr_reference("l_discount"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(0.05, experimental = experimental)
} else {
duckdb$expr_constant(0.05)
}
),
">="
)
),
duckdb$expr_comparison(
"<=",
list(
duckdb$expr_reference("l_discount"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(0.07, experimental = experimental)
} else {
duckdb$expr_constant(0.07)
}
),
"<="
)
),
duckdb$expr_comparison(
"<",
list(
duckdb$expr_reference("l_quantity"),
if ("experimental" %in% names(formals(duckdb$expr_constant))) {
duckdb$expr_constant(24, experimental = experimental)
} else {
duckdb$expr_constant(24)
}
),
"<"
)
)
)
)
Expand Down
Loading

0 comments on commit 5c3d091

Please sign in to comment.