Hi,
I understand that n_distinct() with multiple arguments is not supported for a generic dbplyr backend since SQL does not support that out of the box.
Is it possible to implement it in the case of duckdb using structs?
For example:
dbplyr::tbl_lazy(data.frame(x = 1, y = 1), duckdb::simulate_duckdb()) |>
summarize(l = n_distinct(x, y))
could be translated to
<SQL>
SELECT COUNT(DISTINCT {'x' : `x`, 'y' : `y`}) AS `l`
FROM `df`
which executes on duckdb.