Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix zerofill for time series #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1466,9 +1466,9 @@ private List<AccumPoint> extractAccumulationPoints(String principal, DataSeriesS
|| grpdim.getSqlType() == FieldType.DATE_TIME)) {
ArrayList<AccumPoint> fullVector = new ArrayList<AccumPoint>(records.size());
//create zero points for each accumulation
Map<String, Number> zeroes = new HashMap<String, Number>();
Map<String, Number> noData = new HashMap<String, Number>();
for (Dimension accumulation : accumulations) {
zeroes.put(accumulation.getId(), 0);
noData.put(accumulation.getId(), Double.NaN);
}
if (records.size() > 0) {
final Calendar cal = new GregorianCalendar();
Expand Down Expand Up @@ -1533,7 +1533,7 @@ private List<AccumPoint> extractAccumulationPoints(String principal, DataSeriesS
HashMap<String, Object> map = new HashMap<String, Object>();
map.put(groupId, cal.getTime());
Record r = new QueryRecord(m, map);
fullVector.add(new AccumPointImpl(zeroes, r));
fullVector.add(new AccumPointImpl(noData, r));
}
if (resolution.equalsIgnoreCase(WEEKLY)) {
// add 7 days if current date falls on week start date
Expand Down