Skip to content

Commit

Permalink
W-14071255: set isAbsent(true) for null values
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoineausf committed Sep 6, 2023
1 parent 0dc2270 commit de27ef2
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,15 @@ else if ( protobuf )
{
LOG.info( String.format( "carbonapi request: found value [%s]",
( value == null ? "null" : (double) value ) ) );
metricsSeriesBuilder.addValues(value);
metricsSeriesBuilder.addIsAbsent(false);
if ( value == null )
{
metricsSeriesBuilder.addIsAbsent(true);
}
else
{
metricsSeriesBuilder.addValues(value);
metricsSeriesBuilder.addIsAbsent(false);
}
}

MetricsResponse.Series metricsSeries = metricsSeriesBuilder.build();
Expand Down

0 comments on commit de27ef2

Please sign in to comment.