ZhanGHanG9991 commented on code in PR #7277:
URL: https://github.com/apache/iotdb/pull/7277#discussion_r969604783
##########
server/src/main/java/org/apache/iotdb/db/mpp/aggregation/CountAccumulator.java:
##########
@@ -36,28 +37,31 @@ public CountAccumulator() {}
// Column should be like: | Time | Value |
@Override
- public int addInput(Column[] column, TimeRange timeRange) {
+ public int addInput(Column[] column, IWindow curWindow) {
+ int windowControlColumnIndex = curWindow.getControlColumnIndex();
+ int curPositionCount = column[windowControlColumnIndex].getPositionCount();
+
TimeColumn timeColumn = (TimeColumn) column[0];
Column valueColumn = column[1];
long minTime = Math.min(timeColumn.getStartTime(),
timeColumn.getEndTime());
long maxTime = Math.max(timeColumn.getStartTime(),
timeColumn.getEndTime());
- if (!valueColumn.mayHaveNull() && timeRange.contains(minTime, maxTime)) {
+
+ if (curWindow.isTimeWindow()
+ && !valueColumn.mayHaveNull()
+ && ((TimeWindow) curWindow).getCurTimeRange().contains(minTime,
maxTime)) {
Review Comment:
I've added a new method `contains()` in IWindow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]