Sh-Zh-7 commented on code in PR #14213:
URL: https://github.com/apache/iotdb/pull/14213#discussion_r1915322266


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/AvgAccumulator.java:
##########
@@ -204,4 +237,44 @@ private void addDoubleInput(Column column) {
       }
     }
   }
+
+  private void removeIntInput(Column column) {
+    int count = column.getPositionCount();
+    for (int i = 0; i < count; i++) {
+      if (!column.isNull(i)) {
+        countValue--;
+        sumValue -= column.getInt(i);
+      }
+    }
+  }
+
+  private void removeLongInput(Column column) {
+    int count = column.getPositionCount();
+    for (int i = 0; i < count; i++) {
+      if (!column.isNull(i)) {
+        countValue--;
+        sumValue -= column.getLong(i);
+      }
+    }
+  }
+
+  private void removeFloatInput(Column column) {
+    int count = column.getPositionCount();
+    for (int i = 0; i < count; i++) {
+      if (!column.isNull(i)) {
+        countValue--;
+        sumValue += column.getFloat(i);

Review Comment:
   Done.



-- 
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]

Reply via email to