Skip to content

Commit

Permalink
Update group ID matching to GTE
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyhb committed Jul 17, 2024
1 parent 10e1f69 commit 03e4378
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion expr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

Expand Down

0 comments on commit 03e4378

Please sign in to comment.