You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/04/12 08:35:01 UTC

[iotdb] branch ty-mpp updated: add some comments and todo

This is an automated email from the ASF dual-hosted git repository.

jackietien pushed a commit to branch ty-mpp
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/ty-mpp by this push:
     new 29b98bdee6 add some comments and todo
29b98bdee6 is described below

commit 29b98bdee68789c1b2705ff92d0d6827e212ac3b
Author: JackieTien97 <ja...@gmail.com>
AuthorDate: Tue Apr 12 16:34:51 2022 +0800

    add some comments and todo
---
 .../apache/iotdb/db/mpp/execution/QueryExecution.java  |  1 +
 .../org/apache/iotdb/db/utils/QueryDataSetUtils.java   | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/QueryExecution.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/QueryExecution.java
index e70733b50e..a9777001e5 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/QueryExecution.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/QueryExecution.java
@@ -183,6 +183,7 @@ public class QueryExecution implements IQueryExecution {
 
   /** return the result column count without the time column */
   public int getOutputValueColumnCount() {
+    // TODO need return the actual size while there exists output columns in Analysis
     return 1;
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java b/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
index c65e57f208..f66377c21d 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/QueryDataSetUtils.java
@@ -195,14 +195,18 @@ public class QueryDataSetUtils {
     while (rowCount < fetchSize && queryExecution.hasNextResult()) {
       TsBlock tsBlock = queryExecution.getBatchResult();
       int currentCount = tsBlock.getPositionCount();
+      // serialize time column
       for (int i = 0; i < currentCount; i++) {
         // use columnOutput to write byte array
         dataOutputStreams[0].writeLong(tsBlock.getTimeByIndex(i));
       }
+
+      // serialize each value column and its bitmap
       for (int k = 0; k < columnNum; k++) {
+        // get DataOutputStream for current value column and its bitmap
         DataOutputStream dataOutputStream = dataOutputStreams[2 * k + 1];
         DataOutputStream dataBitmapOutputStream = dataOutputStreams[2 * (k + 1)];
-        // used to record a bitmap for every 8 row record
+        // used to record a bitmap for every 8 points
         int bitmap = 0;
         Column column = tsBlock.getColumn(k);
         TSDataType type = column.getDataType();
@@ -218,7 +222,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }
@@ -234,7 +238,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }
@@ -250,7 +254,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }
@@ -266,7 +270,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }
@@ -282,7 +286,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }
@@ -300,7 +304,7 @@ public class QueryDataSetUtils {
               }
               if (i % 8 == 0) {
                 dataBitmapOutputStream.writeByte(bitmap);
-                // we should clear the bitmap every 8 row record
+                // we should clear the bitmap every 8 points
                 bitmap = 0;
               }
             }