You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/01/12 11:31:47 UTC

[GitHub] [iotdb] SteveYurongSu commented on a change in pull request #4789: [IOTDB-2332] Clause 'without null' is not supported in nested expressions of aggregations with 'group by time'

SteveYurongSu commented on a change in pull request #4789:
URL: https://github.com/apache/iotdb/pull/4789#discussion_r782982666



##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/UDTFAlignByTimeDataSet.java
##########
@@ -116,7 +116,36 @@ public TSQueryDataSet fillBuffer(int fetchSize, WatermarkEncoder encoder)
         && (rowLimit <= 0 || alreadyReturnedRowNum < rowLimit)
         && !timeHeap.isEmpty()) {
 
+      int nullFieldsCnt = 0;
       long minTime = timeHeap.pollFirst();
+
+      for (LayerPointReader reader : transformers) {
+        if (!reader.next() || reader.currentTime() != minTime) {
+          nullFieldsCnt++;
+          continue;
+        }
+        if (reader.isCurrentNull()) {
+          nullFieldsCnt++;
+        }

Review comment:
       ```suggestion
           if (!reader.next() || reader.currentTime() != minTime || reader.isCurrentNull()) {
             nullFieldsCnt++;
           }
   ```




-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org