Skip to content

Commit

Permalink
storage: Do not modify the input query at VariantStorageEngine::count…
Browse files Browse the repository at this point in the history
… #TASK-4938
  • Loading branch information
j-coll committed Sep 19, 2023
1 parent abd4e68 commit 465289a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1315,9 +1315,10 @@ public DataResult groupBy(Query query, List<String> fields, QueryOptions options
}

public DataResult<Long> count(Query query) throws StorageEngineException {
VariantQueryResult<Variant> result = get(query, new QueryOptions(QueryOptions.INCLUDE, VariantField.ID)
.append(QueryOptions.LIMIT, 1)
.append(QueryOptions.COUNT, true));
VariantQueryResult<Variant> result = get(VariantQueryUtils.copy(query),
new QueryOptions(QueryOptions.INCLUDE, VariantField.ID)
.append(QueryOptions.LIMIT, 1)
.append(QueryOptions.COUNT, true));
return new DataResult<>(
result.getTime(),
result.getEvents(),
Expand Down

0 comments on commit 465289a

Please sign in to comment.