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 2021/03/16 06:52:03 UTC

[iotdb] branch TYQuery updated (1797834 -> 2fdf884)

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

jackietien pushed a change to branch TYQuery
in repository https://gitbox.apache.org/repos/asf/iotdb.git.


    from 1797834  [To Vector] Modify RawQueryDataSetWithoutValueFilter to fit for Vector type (#2853)
     new 67f5336  RawQueryDatasetWithoutValueFilter
     new 2fdf884  format code

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../dataset/RawQueryDataSetWithoutValueFilter.java | 28 +++++++++++++++-------
 1 file changed, 19 insertions(+), 9 deletions(-)


[iotdb] 01/02: RawQueryDatasetWithoutValueFilter

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 67f533610062ffd428f124990aa791120d7af0d7
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Mar 16 14:49:33 2021 +0800

    RawQueryDatasetWithoutValueFilter
---
 .../dataset/RawQueryDataSetWithoutValueFilter.java | 26 ++++++++++++++--------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
index b4150bb..814aa27 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
@@ -146,6 +146,8 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
 
   protected BatchData[] cachedBatchDataArray;
 
+  private int bufferNum;
+
   // capacity for blocking queue
   private static final int BLOCKING_QUEUE_CAPACITY = 5;
 
@@ -179,6 +181,14 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
     }
     cachedBatchDataArray = new BatchData[readers.size()];
     noMoreDataInQueueArray = new boolean[readers.size()];
+    bufferNum = 0;
+    for (int index = 0; index < paths.size(); index++) {
+      if (paths.get(index) instanceof VectorPartialPath) {
+        bufferNum += ((VectorPartialPath) paths).getSubSensorsPathList().size();
+      } else {
+        bufferNum += 1;
+      }
+    }
     init();
   }
 
@@ -215,14 +225,7 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
     TSQueryDataSet tsQueryDataSet = new TSQueryDataSet();
 
     PublicBAOS timeBAOS = new PublicBAOS();
-    int bufferNum = 0;
-    for (int index = 0; index < seriesNum; index++) {
-      if (paths.get(index) instanceof VectorPartialPath) {
-        bufferNum += ((VectorPartialPath) paths).getSubSensorsPathList().size();
-      } else {
-        bufferNum += 1;
-      }
-    }
+
     PublicBAOS[] valueBAOSList = new PublicBAOS[bufferNum];
     PublicBAOS[] bitmapBAOSList = new PublicBAOS[bufferNum];
 
@@ -254,7 +257,7 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
           // current batch is empty or does not have value at minTime
           if (rowOffset == 0) {
             if (paths.get(seriesIndex) instanceof VectorPartialPath) {
-              for (int i = 0; i < ((VectorPartialPath) paths).getSubSensorsPathList().size(); i++) {
+              for (int i = 0; i < ((VectorPartialPath) paths.get(seriesIndex)).getSubSensorsPathList().size(); i++) {
                 currentBitmapList[bufferIndex] = (currentBitmapList[bufferIndex] << 1);
                 bufferIndex++;
               }
@@ -318,6 +321,11 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
                 break;
               case VECTOR:
                 for (TsPrimitiveType primitiveVal : cachedBatchDataArray[seriesIndex].getVector()) {
+                  if (primitiveVal == null) {
+                    currentBitmapList[bufferIndex] = (currentBitmapList[bufferIndex] << 1);
+                    bufferIndex++;
+                    continue;
+                  }
                   currentBitmapList[bufferIndex] = (currentBitmapList[bufferIndex] << 1) | FLAG;
                   switch (primitiveVal.getDataType()) {
                     case INT32:


[iotdb] 02/02: format code

Posted by ja...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2fdf884e50bed9d84f6020334bc8baca82420d63
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Mar 16 14:51:43 2021 +0800

    format code
---
 .../iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
index 814aa27..9d9babe 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/dataset/RawQueryDataSetWithoutValueFilter.java
@@ -257,7 +257,9 @@ public class RawQueryDataSetWithoutValueFilter extends QueryDataSet
           // current batch is empty or does not have value at minTime
           if (rowOffset == 0) {
             if (paths.get(seriesIndex) instanceof VectorPartialPath) {
-              for (int i = 0; i < ((VectorPartialPath) paths.get(seriesIndex)).getSubSensorsPathList().size(); i++) {
+              for (int i = 0;
+                  i < ((VectorPartialPath) paths.get(seriesIndex)).getSubSensorsPathList().size();
+                  i++) {
                 currentBitmapList[bufferIndex] = (currentBitmapList[bufferIndex] << 1);
                 bufferIndex++;
               }