Skip to content

Commit

Permalink
Fix empty ALL metrics (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
kathy-t authored Oct 30, 2024
1 parent 8542e57 commit febcd9d
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,14 @@ public Map<String, M> createMetricByPlatform(AthenaTablePartition partition) {
LOG.error("Could not execute query for partition {}", partition, e);
return Map.of();
}
return createMetricByPlatform(queryResultRows);

Map<String, M> metricByPlatform = createMetricByPlatform(queryResultRows);
// Check that metrics exist for actual platforms. May end up with metrics for only 'ALL' if there are no executions of that type
// because null platform values are coalesced to 'ALL'.
if (metricByPlatform.size() == 1 && metricByPlatform.containsKey(Partner.ALL.name())) {
return Map.of();
}
return metricByPlatform;
}

public void printQuery(AthenaTablePartition partition) {
Expand Down

0 comments on commit febcd9d

Please sign in to comment.