liutaohua commented on a change in pull request #818: [IOTDB-482] Vectorized 
TimeGenerator
URL: https://github.com/apache/incubator-iotdb/pull/818#discussion_r380220800
 
 

 ##########
 File path: 
tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/AndNode.java
 ##########
 @@ -41,46 +46,90 @@ public AndNode(Node leftChild, Node rightChild) {
   }
 
   @Override
-  public boolean hasNext() throws IOException {
+  public boolean hasNextTimeColumn() throws IOException {
     if (hasCachedValue) {
       return true;
     }
-    if (leftChild.hasNext() && rightChild.hasNext()) {
-      long leftValue = leftChild.next();
-      long rightValue = rightChild.next();
-      while (true) {
-        if (leftValue == rightValue) {
-          this.hasCachedValue = true;
-          this.cachedValue = leftValue;
-          return true;
-        } else if (leftValue > rightValue) {
-          if (rightChild.hasNext()) {
-            rightValue = rightChild.next();
-          } else {
-            return false;
-          }
-        } else { // leftValue < rightValue
-          if (leftChild.hasNext()) {
-            leftValue = leftChild.next();
-          } else {
-            return false;
-          }
+    cachedTimeColumn = new TimeColumn(1000);
+    //fill data
+    fillLeftData();
+    fillRightData();
+    /*
+     *  [1,2,3,4,5]   <-   that was stopBatchTime mean
+     *  [1,2,3,4,5,6]
+     */
+    long stopBatchTime = getStopBatchTime();
 
 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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to