Skip to content

Commit

Permalink
Ensure that rows_distinct() works with BigQuery tbls
Browse files Browse the repository at this point in the history
  • Loading branch information
rich-iannone committed May 14, 2022
1 parent bbb4a84 commit 04688fd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions R/interrogate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2321,8 +2321,9 @@ interrogate_distinct <- function(

# nocov start

# Create another variation of `tbl_rows_distinct()` that works for MySQL
tbl_rows_distinct_mysql <- function(
# Create a variation of `tbl_rows_distinct()` that works
# for MySQL and for BigQuery
tbl_rows_distinct_2 <- function(
table,
column_names,
col_syms
Expand All @@ -2347,9 +2348,9 @@ interrogate_distinct <- function(
}

# Perform the validation of the table
if (agent$tbl_src == "mysql") {
if (agent$tbl_src %in% c("mysql", "bigquery")) {
pointblank_try_catch(
tbl_rows_distinct_mysql(
tbl_rows_distinct_2(
table = table,
column_names = {{ column_names }},
col_syms = col_syms
Expand Down

0 comments on commit 04688fd

Please sign in to comment.