Skip to content

Commit

Permalink
Added short circuit to matching
Browse files Browse the repository at this point in the history
Signed-off-by: expani <anijainc@amazon.com>
  • Loading branch information
expani committed Jan 28, 2025
1 parent b19c4e5 commit 204a107
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ public void collectStarTreeNode(StarTreeNode node) {
}

public boolean matchAllCollectedValues(long... values) throws IOException {
boolean matches = true;
for (long value : values) {
matches &= nodeDimensionValues.contains(value);
if (!nodeDimensionValues.contains(value)) return false;
}
return matches;
return true;
}

public int collectedNodeCount() {
Expand Down

0 comments on commit 204a107

Please sign in to comment.