calogica / dbt-expectations

Port(ish) of Great Expectations to dbt test macros
https://calogica.github.io/dbt-expectations/
Apache License 2.0
1.01k stars 123 forks source link

Fix expect_column_most_common_value_to_be_in_set handling of ties #259

Closed lookslikeitsnot closed 11 months ago

lookslikeitsnot commented 1 year ago

Issue this PR Addresses/Closes

Closes #258 Add expected-to-fail tests for expect_column_most_common_value_to_be_in_set (https://github.com/calogica/dbt-expectations/issues/207)

Summary of Changes

Fixes tie handling of expect_column_most_common_value_to_be_in_set by rank()-ing the occurrences of column values instead of row_number()-ing them. Adds a ties_okay to validate partial matches in case of ties.

Why Do We Need These Changes

expect_column_most_common_value_to_be_in_set doesn't work reliably when multiple column values have the same occurrence.

Reviewers

@clausherther

lookslikeitsnot commented 11 months ago

Any reason for the closing? No response was ever given to the comment I made 3 months ago and the issue is still open.

On Fri, 1 Sept 2023 at 17:45, Claus Herther @.***> wrote:

Closed #259 https://github.com/calogica/dbt-expectations/pull/259.

— Reply to this email directly, view it on GitHub https://github.com/calogica/dbt-expectations/pull/259#event-10258725605, or unsubscribe https://github.com/notifications/unsubscribe-auth/AID4QCE6GZWMZ7VVJTY2W4TXYH7KZANCNFSM6AAAAAAYFIHHFE . You are receiving this because you authored the thread.Message ID: @.***>