Skip to content

Commit a1a5c55

Browse files
committed
Tests
1 parent dc244a8 commit a1a5c55

File tree

13 files changed

+20
-26
lines changed

13 files changed

+20
-26
lines changed

Diff for: R/tpch_raw_07.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ tpch_raw_07 <- function(con, experimental) {
686686
},
687687
{
688688
tmp_expr <- duckdb$expr_function(
689-
"as.integer",
689+
"r_base::as.integer",
690690
list(
691691
duckdb$expr_function(
692692
"strftime",

Diff for: R/tpch_raw_08.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ tpch_raw_08 <- function(con, experimental) {
686686
},
687687
{
688688
tmp_expr <- duckdb$expr_function(
689-
"as.integer",
689+
"r_base::as.integer",
690690
list(
691691
duckdb$expr_function(
692692
"strftime",

Diff for: R/tpch_raw_09.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ tpch_raw_09 <- function(con, experimental) {
555555
},
556556
{
557557
tmp_expr <- duckdb$expr_function(
558-
"as.integer",
558+
"r_base::as.integer",
559559
list(
560560
duckdb$expr_function(
561561
"strftime",

Diff for: R/tpch_raw_oo_07.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ tpch_raw_oo_07 <- function(con, experimental) {
11501150
},
11511151
{
11521152
tmp_expr <- duckdb$expr_function(
1153-
"as.integer",
1153+
"r_base::as.integer",
11541154
list(
11551155
duckdb$expr_function(
11561156
"strftime",

Diff for: R/tpch_raw_oo_08.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ tpch_raw_oo_08 <- function(con, experimental) {
11471147
},
11481148
{
11491149
tmp_expr <- duckdb$expr_function(
1150-
"as.integer",
1150+
"r_base::as.integer",
11511151
list(
11521152
duckdb$expr_function(
11531153
"strftime",

Diff for: R/tpch_raw_oo_09.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ tpch_raw_oo_09 <- function(con, experimental) {
866866
},
867867
{
868868
tmp_expr <- duckdb$expr_function(
869-
"as.integer",
869+
"r_base::as.integer",
870870
list(
871871
duckdb$expr_function(
872872
"strftime",

Diff for: tests/testthat/test-rel_api.R

+8-8
Original file line numberDiff line numberDiff line change
@@ -8990,7 +8990,7 @@ test_that("relational mutate(d = row_number()) order-preserving", {
89908990
drv <- duckdb::duckdb()
89918991
con <- DBI::dbConnect(drv)
89928992
experimental <- FALSE
8993-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
8993+
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
89948994
df1 <- data.frame(a = seq(1, 6, by = 1), b = rep(2, 6L), g = c(1L, 2L, 2L, 3L, 3L, 3L))
89958995

89968996
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -9014,7 +9014,7 @@ test_that("relational mutate(d = row_number()) order-preserving", {
90149014
},
90159015
{
90169016
tmp_expr <- duckdb$expr_function(
9017-
"as.integer",
9017+
"r_base::as.integer",
90189018
list(
90199019
duckdb$expr_window(duckdb$expr_function("row_number", list()), list(), list(), offset_expr = NULL, default_expr = NULL)
90209020
)
@@ -9039,7 +9039,7 @@ test_that("relational mutate(d = row_number(), .by = g) order-preserving", {
90399039
drv <- duckdb::duckdb()
90409040
con <- DBI::dbConnect(drv)
90419041
experimental <- FALSE
9042-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
9042+
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
90439043
df1 <- data.frame(a = seq(1, 6, by = 1), b = rep(2, 6L), g = c(1L, 2L, 2L, 3L, 3L, 3L))
90449044

90459045
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -9093,7 +9093,7 @@ test_that("relational mutate(d = row_number(), .by = g) order-preserving", {
90939093
},
90949094
{
90959095
tmp_expr <- duckdb$expr_function(
9096-
"as.integer",
9096+
"r_base::as.integer",
90979097
list(
90989098
duckdb$expr_window(duckdb$expr_function("row_number", list()), list(duckdb$expr_reference("g")), list(), offset_expr = NULL, default_expr = NULL)
90999099
)
@@ -12941,7 +12941,7 @@ test_that("relational mutate(d = row_number()) order-enforcing", {
1294112941
drv <- duckdb::duckdb()
1294212942
con <- DBI::dbConnect(drv)
1294312943
experimental <- FALSE
12944-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
12944+
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
1294512945
df1 <- data.frame(a = seq(1, 6, by = 1), b = rep(2, 6L), g = c(1L, 2L, 2L, 3L, 3L, 3L))
1294612946

1294712947
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -12965,7 +12965,7 @@ test_that("relational mutate(d = row_number()) order-enforcing", {
1296512965
},
1296612966
{
1296712967
tmp_expr <- duckdb$expr_function(
12968-
"as.integer",
12968+
"r_base::as.integer",
1296912969
list(
1297012970
duckdb$expr_window(duckdb$expr_function("row_number", list()), list(), list(), offset_expr = NULL, default_expr = NULL)
1297112971
)
@@ -12994,7 +12994,7 @@ test_that("relational mutate(d = row_number(), .by = g) order-enforcing", {
1299412994
drv <- duckdb::duckdb()
1299512995
con <- DBI::dbConnect(drv)
1299612996
experimental <- FALSE
12997-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
12997+
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
1299812998
df1 <- data.frame(a = seq(1, 6, by = 1), b = rep(2, 6L), g = c(1L, 2L, 2L, 3L, 3L, 3L))
1299912999

1300013000
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -13018,7 +13018,7 @@ test_that("relational mutate(d = row_number(), .by = g) order-enforcing", {
1301813018
},
1301913019
{
1302013020
tmp_expr <- duckdb$expr_function(
13021-
"as.integer",
13021+
"r_base::as.integer",
1302213022
list(
1302313023
duckdb$expr_window(duckdb$expr_function("row_number", list()), list(duckdb$expr_reference("g")), list(), offset_expr = NULL, default_expr = NULL)
1302413024
)

Diff for: tools/tpch-raw-oo/07.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y
1010
invisible(DBI::dbExecute(con, 'CREATE MACRO ">="(x, y) AS "r_base::>="(x, y)'))
1111
invisible(DBI::dbExecute(con, 'CREATE MACRO "<="(x, y) AS "r_base::<="(x, y)'))
1212
invisible(DBI::dbExecute(con, 'CREATE MACRO "&"(x, y) AS (x AND y)'))
13-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1413
df1 <- supplier
1514
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
1615
rel2 <- duckdb$rel_project(
@@ -1161,7 +1160,7 @@ rel70 <- duckdb$rel_project(
11611160
},
11621161
{
11631162
tmp_expr <- duckdb$expr_function(
1164-
"as.integer",
1163+
"r_base::as.integer",
11651164
list(
11661165
duckdb$expr_function(
11671166
"strftime",

Diff for: tools/tpch-raw-oo/08.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ invisible(DBI::dbExecute(con, 'CREATE MACRO "=="(x, y) AS "r_base::=="(x, y)'))
88
invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y)'))
99
invisible(DBI::dbExecute(con, 'CREATE MACRO ">="(x, y) AS "r_base::>="(x, y)'))
1010
invisible(DBI::dbExecute(con, 'CREATE MACRO "<="(x, y) AS "r_base::<="(x, y)'))
11-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1211
invisible(
1312
DBI::dbExecute(
1413
con,
@@ -1168,7 +1167,7 @@ rel87 <- duckdb$rel_project(
11681167
},
11691168
{
11701169
tmp_expr <- duckdb$expr_function(
1171-
"as.integer",
1170+
"r_base::as.integer",
11721171
list(
11731172
duckdb$expr_function(
11741173
"strftime",

Diff for: tools/tpch-raw-oo/09.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ invisible(
1212
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
1313
invisible(DBI::dbExecute(con, 'CREATE MACRO "=="(x, y) AS "r_base::=="(x, y)'))
1414
invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y)'))
15-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1615
invisible(DBI::dbExecute(con, 'CREATE MACRO "desc"(x) AS (-x)'))
1716
df1 <- part
1817
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -880,7 +879,7 @@ rel57 <- duckdb$rel_project(
880879
},
881880
{
882881
tmp_expr <- duckdb$expr_function(
883-
"as.integer",
882+
"r_base::as.integer",
884883
list(
885884
duckdb$expr_function(
886885
"strftime",

Diff for: tools/tpch-raw/07.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y
1010
invisible(DBI::dbExecute(con, 'CREATE MACRO ">="(x, y) AS "r_base::>="(x, y)'))
1111
invisible(DBI::dbExecute(con, 'CREATE MACRO "<="(x, y) AS "r_base::<="(x, y)'))
1212
invisible(DBI::dbExecute(con, 'CREATE MACRO "&"(x, y) AS (x AND y)'))
13-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1413
df1 <- supplier
1514
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
1615
rel2 <- duckdb$rel_project(
@@ -697,7 +696,7 @@ rel43 <- duckdb$rel_project(
697696
},
698697
{
699698
tmp_expr <- duckdb$expr_function(
700-
"as.integer",
699+
"r_base::as.integer",
701700
list(
702701
duckdb$expr_function(
703702
"strftime",

Diff for: tools/tpch-raw/08.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ invisible(DBI::dbExecute(con, 'CREATE MACRO "=="(x, y) AS "r_base::=="(x, y)'))
88
invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y)'))
99
invisible(DBI::dbExecute(con, 'CREATE MACRO ">="(x, y) AS "r_base::>="(x, y)'))
1010
invisible(DBI::dbExecute(con, 'CREATE MACRO "<="(x, y) AS "r_base::<="(x, y)'))
11-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1211
invisible(
1312
DBI::dbExecute(
1413
con,
@@ -707,7 +706,7 @@ rel57 <- duckdb$rel_project(
707706
},
708707
{
709708
tmp_expr <- duckdb$expr_function(
710-
"as.integer",
709+
"r_base::as.integer",
711710
list(
712711
duckdb$expr_function(
713712
"strftime",

Diff for: tools/tpch-raw/09.R

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ invisible(
1212
invisible(duckdb$rapi_load_rfuns(drv@database_ref))
1313
invisible(DBI::dbExecute(con, 'CREATE MACRO "=="(x, y) AS "r_base::=="(x, y)'))
1414
invisible(DBI::dbExecute(con, 'CREATE MACRO "___coalesce"(x, y) AS COALESCE(x, y)'))
15-
invisible(DBI::dbExecute(con, 'CREATE MACRO "as.integer"(x) AS CAST(x AS int32)'))
1615
invisible(DBI::dbExecute(con, 'CREATE MACRO "desc"(x) AS (-x)'))
1716
df1 <- part
1817
rel1 <- duckdb$rel_from_df(con, df1, experimental = experimental)
@@ -569,7 +568,7 @@ rel39 <- duckdb$rel_project(
569568
},
570569
{
571570
tmp_expr <- duckdb$expr_function(
572-
"as.integer",
571+
"r_base::as.integer",
573572
list(
574573
duckdb$expr_function(
575574
"strftime",

0 commit comments

Comments
 (0)