From 03e4378c436c7cddda724931d25dd045dd360cb7 Mon Sep 17 00:00:00 2001 From: Tony Holdstock-Brown Date: Wed, 17 Jul 2024 08:10:33 -0700 Subject: [PATCH] Update group ID matching to GTE --- expr.go | 2 +- expr_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/expr.go b/expr.go index c87a54e..9ccf400 100644 --- a/expr.go +++ b/expr.go @@ -295,7 +295,7 @@ func (a *aggregator) AggregateMatch(ctx context.Context, data map[string]any) ([ for groupID, matchingCount := range counts { requiredSize := int(groupID.Size()) // The total req size from the group ID - if matchingCount > requiredSize { + if matchingCount >= requiredSize { // The matching count met the group size; all results are safe. result = append(result, found[groupID]...) continue diff --git a/expr_test.go b/expr_test.go index 1e16e73..54dc8be 100644 --- a/expr_test.go +++ b/expr_test.go @@ -172,7 +172,7 @@ func TestEvaluate_Strings(t *testing.T) { require.NoError(t, err) require.EqualValues(t, 0, len(evals)) - require.EqualValues(t, 1, matched) // We still ran one expression + require.EqualValues(t, 0, matched) }) }