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 01:30:42 UTC

[iotdb] branch TYQuery updated (2617771 -> df3b895)

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 2617771  fix conflicts and format code
     add bd869bb  Session for experiment
     add 48bc336  [To Vector] Add the disk read methods about SeriesReader and memory data operation interface. (#2835)
     add 73cd0c4  Merge remote-tracking branch 'origin/Vector' into Vector
     add 5f4a12a  Tablet.addValue
     add 8140378  Quick fix for experiment
     add 6bbd438  fix put indices error in vectorTVList
     add c3985c2  fix put indices error in vectorTVList
     add 41719ca  fix put indices error in vectorTVList
     add 6925684  support query memtable step 1
     add 8e8b164  correct insert plan
     add 9a498d4  format code
     add 38d99c9  delete cluster test
     add 54c125f  fix insert tablet seralization
     add 896aa50  Merge branch 'Vector' of https://github.com/apache/iotdb into Vector
     add eb99e69  debug
     add 5e7db3a  format code
     add f434983  support query memtable step 2
     new df3b895  fix conflicts

The 1 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:
 .../cluster/log/logtypes/SerializeLogTest.java     |  143 ---
 .../cluster/server/member/DataGroupMemberTest.java | 1126 --------------------
 .../iotdb/db/engine/memtable/AbstractMemTable.java |   36 +
 .../db/engine/querycontext/ReadOnlyMemChunk.java   |   75 +-
 .../db/qp/physical/crud/InsertTabletPlan.java      |   24 +-
 .../iotdb/db/query/reader/chunk/MemPageReader.java |    6 +-
 .../org/apache/iotdb/db/service/TSServiceImpl.java |    2 +-
 .../java/org/apache/iotdb/db/utils/MemUtils.java   |   14 +-
 .../iotdb/db/utils/datastructure/TVList.java       |    4 +
 .../iotdb/db/utils/datastructure/VectorTVList.java |   24 +-
 .../iotdb/db/qp/physical/InsertTabletPlanTest.java |   90 +-
 .../java/org/apache/iotdb/session/Session.java     |   34 +-
 .../org/apache/iotdb/session/SessionUtils.java     |   97 +-
 .../apache/iotdb/tsfile/write/record/Tablet.java   |  158 ++-
 .../tsfile/write/schema/IMeasurementSchema.java    |    2 +
 .../tsfile/write/schema/MeasurementSchema.java     |    5 +
 .../write/schema/VectorMeasurementSchema.java      |    5 +
 .../write/writer/VectorMeasurementSchemaStub.java  |    5 +
 18 files changed, 406 insertions(+), 1444 deletions(-)
 delete mode 100644 cluster/src/test/java/org/apache/iotdb/cluster/log/logtypes/SerializeLogTest.java
 delete mode 100644 cluster/src/test/java/org/apache/iotdb/cluster/server/member/DataGroupMemberTest.java


[iotdb] 01/01: fix conflicts

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 df3b89594693bfba6225ad4346e3b264abc06879
Merge: 2617771 f434983
Author: JackieTien97 <Ja...@foxmail.com>
AuthorDate: Tue Mar 16 09:24:16 2021 +0800

    fix conflicts

 .../cluster/log/logtypes/SerializeLogTest.java     |  143 ---
 .../cluster/server/member/DataGroupMemberTest.java | 1126 --------------------
 .../iotdb/db/engine/memtable/AbstractMemTable.java |   36 +
 .../db/engine/querycontext/ReadOnlyMemChunk.java   |   75 +-
 .../db/qp/physical/crud/InsertTabletPlan.java      |   24 +-
 .../iotdb/db/query/reader/chunk/MemPageReader.java |    6 +-
 .../org/apache/iotdb/db/service/TSServiceImpl.java |    2 +-
 .../java/org/apache/iotdb/db/utils/MemUtils.java   |   14 +-
 .../iotdb/db/utils/datastructure/TVList.java       |    4 +
 .../iotdb/db/utils/datastructure/VectorTVList.java |   24 +-
 .../iotdb/db/qp/physical/InsertTabletPlanTest.java |   90 +-
 .../java/org/apache/iotdb/session/Session.java     |   34 +-
 .../org/apache/iotdb/session/SessionUtils.java     |   97 +-
 .../apache/iotdb/tsfile/write/record/Tablet.java   |  158 ++-
 .../tsfile/write/schema/IMeasurementSchema.java    |    2 +
 .../tsfile/write/schema/MeasurementSchema.java     |    5 +
 .../write/schema/VectorMeasurementSchema.java      |    5 +
 .../write/writer/VectorMeasurementSchemaStub.java  |    5 +
 18 files changed, 406 insertions(+), 1444 deletions(-)

diff --cc server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
index ef7f545,ccab036..ca14b1c
--- a/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
@@@ -292,19 -292,43 +292,55 @@@ public abstract class AbstractMemTable 
          measurement, dataType, encoding, chunkCopy, props, curSize, deletionList);
    }
  
 +  // TODO BY HAONAN HOU
 +  @Override
 +  public ReadOnlyMemChunk query(
 +      String deviceId,
 +      String measurement,
 +      IMeasurementSchema schema,
 +      long timeLowerBound,
 +      List<TimeRange> deletionList)
 +      throws IOException, QueryProcessException, MetadataException {
 +    return null;
 +  }
 +
    @Override
+   public ReadOnlyMemChunk query(
+       String deviceId,
+       String measurement,
+       IMeasurementSchema schema,
+       long timeLowerBound,
+       List<TimeRange> deletionList)
+       throws IOException, QueryProcessException, MetadataException {
+     if (schema.getType() == TSDataType.VECTOR) {
+       if (!memTableMap.containsKey(deviceId)) {
+         return null;
+       }
+       IWritableMemChunk memChunk = memTableMap.get(deviceId).get(schema.getMeasurementId());
+       // get sorted tv list is synchronized so different query can get right sorted list reference
+       TVList chunkCopy = memChunk.getSortedTVListForQuery();
+       int curSize = chunkCopy.size();
+       return new ReadOnlyMemChunk(schema, chunkCopy, curSize, deletionList);
+     } else {
+       if (!checkPath(deviceId, measurement)) {
+         return null;
+       }
+       IWritableMemChunk memChunk = memTableMap.get(deviceId).get(schema.getMeasurementId());
+       // get sorted tv list is synchronized so different query can get right sorted list reference
+       TVList chunkCopy = memChunk.getSortedTVListForQuery();
+       int curSize = chunkCopy.size();
+       return new ReadOnlyMemChunk(
+           measurement,
+           schema.getType(),
+           schema.getEncodingType(),
+           chunkCopy,
+           schema.getProps(),
+           curSize,
+           deletionList);
+     }
+   }
+ 
+   @Override
    public void delete(
        PartialPath originalPath, PartialPath devicePath, long startTimestamp, long endTimestamp) {
      Map<String, IWritableMemChunk> deviceMap = memTableMap.get(devicePath.getFullPath());