From 4af7c4121b1fc9861439a91dea913068a2a84e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kirill=20M=C3=BCller?= Date: Sun, 12 Nov 2023 19:37:02 +0100 Subject: [PATCH] fix: `distinct()` now preserves order in corner cases --- R/distinct.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/distinct.R b/R/distinct.R index 1a236ec2..4b819010 100644 --- a/R/distinct.R +++ b/R/distinct.R @@ -38,6 +38,7 @@ distinct.duckplyr_df <- function(.data, ..., .keep_all = FALSE) { relexpr_window( relexpr_function("row_number", list()), partitions = exprs, + order_bys = list(relexpr_reference("___row_number")), alias = "___row_number_by" ) ))