HTHou commented on a change in pull request #2992:
URL: https://github.com/apache/iotdb/pull/2992#discussion_r611348197



##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
##########
@@ -121,13 +121,11 @@ public void addValue(String measurementId, int rowIndex, 
Object value) {
     IMeasurementSchema measurementSchema = schemas.get(indexOfValue);
 
     if (measurementSchema.getType().equals(TSDataType.VECTOR)) {
-      for (int i = 0; i < 
measurementSchema.getValueMeasurementIdList().size(); i++) {
-        TSDataType dataType = 
measurementSchema.getValueTSDataTypeList().get(i);
-        addValueOfDataType(dataType, rowIndex, 
measurementIndex.get(measurementId), value);
-      }
+      int indexInVector = 
measurementSchema.getMeasurementIdColumnIndex(measurementId);
+      TSDataType dataType = 
measurementSchema.getValueTSDataTypeList().get(indexInVector);
+      addValueOfDataType(dataType, rowIndex, indexOfValue + indexInVector, 
value);

Review comment:
       We need to consider when `value == null`, init the `BitMaps` in tablet 
if needed, set an irrelevant value into the array, and mark this position of 
bitMap to represent this's a null value.




-- 
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]


Reply via email to