Returning only original data aggregation granularity in case of non additive datasets
@@ -246,7 +246,9 @@ public class DataResource {
int dataTimeSize = datasetConfig.bucketTimeGranularity().getSize();
TimeUnit dataTimeUnit = datasetConfig.bucketTimeGranularity().getUnit();
+
List<String> dataGranularities = new ArrayList<>();
+ if (datasetConfig.isAdditive()) { // Add additional aggregation granularities only for additive datasets
switch (dataTimeUnit) {
case MILLISECONDS:
case SECONDS:
@@ -259,6 +261,9 @@ public class DataResource {
dataGranularities.add(getDataGranularityString(1, TimeUnit.DAYS));
break;
}
+ } else { // for non additive, keep only original granularity
+ dataGranularities.add(getDataGranularityString(dataTimeSize, dataTimeUnit));
+ }
return dataGranularities;
}
