Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Nov 6, 2024
1 parent fa1a1e8 commit 8b76a9b
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,20 @@ public void aggregateQuery(

switch (Objects.requireNonNull(aggType)) {
case "count":
result.putDouble(Objects.requireNonNull(key), Long.valueOf(snapshot.getCount()).doubleValue());
result.putDouble(
Objects.requireNonNull(key),
Long.valueOf(snapshot.getCount()).doubleValue());
break;
case "sum":
Number sum = (Number) snapshot.get(sum(Objects.requireNonNull(field)));
result.putDouble(Objects.requireNonNull(key), Objects.requireNonNull(sum).doubleValue());
result.putDouble(
Objects.requireNonNull(key), Objects.requireNonNull(sum).doubleValue());
break;
case "average":
Number average = snapshot.get(average(Objects.requireNonNull(field)));
result.putDouble(Objects.requireNonNull(key), Objects.requireNonNull(average).doubleValue());
result.putDouble(
Objects.requireNonNull(key),
Objects.requireNonNull(average).doubleValue());
break;
default:
throw new Error("Invalid AggregateType: " + aggType);
Expand Down

0 comments on commit 8b76a9b

Please sign in to comment.