@@ -129,6 +129,9 @@ public GetFeatureStatisticsResponse getFeatureStatistics(GetFeatureStatisticsReq
129129 List <FeatureNameStatistics > featureNameStatistics =
130130 getFeatureNameStatisticsByDate (
131131 statisticsRetriever , featureSet , features , timestamp , request .getForceRefresh ());
132+ if (featureNameStatistics .size () != 0 ) {
133+ featureNameStatisticsList .add (featureNameStatistics );
134+ }
132135 featureNameStatisticsList .add (featureNameStatistics );
133136 timestamp += 86400 ; // advance by a day
134137 }
@@ -147,14 +150,16 @@ public GetFeatureStatisticsResponse getFeatureStatistics(GetFeatureStatisticsReq
147150 List <FeatureNameStatistics > featureNameStatistics =
148151 getFeatureNameStatisticsByDataset (
149152 statisticsRetriever , featureSet , features , datasetId , request .getForceRefresh ());
150- featureNameStatisticsList .add (featureNameStatistics );
151- if (featureNameStatisticsList .size () == 0 ) {
152- throw new RetrievalException (
153- String .format (
154- "Unable to find any data over provided data sets %s" ,
155- request .getIngestionIdsList ()));
153+ if (featureNameStatistics .size () != 0 ) {
154+ featureNameStatisticsList .add (featureNameStatistics );
156155 }
157156 }
157+ if (featureNameStatisticsList .size () == 0 ) {
158+ throw new RetrievalException (
159+ String .format (
160+ "Unable to find any data over provided data sets %s" ,
161+ request .getIngestionIdsList ()));
162+ }
158163 }
159164
160165 // Merge statistics values across days/datasets
0 commit comments