You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2020/08/29 06:56:39 UTC
[GitHub] [incubator-iotdb] wyh-ztf commented on a change in pull request #1658: IOTDB-839:Make Tablet api more friendly
wyh-ztf commented on a change in pull request #1658:
URL: https://github.com/apache/incubator-iotdb/pull/1658#discussion_r479617282
##########
File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/Tablet.java
##########
@@ -95,12 +103,48 @@ public Tablet(String deviceId, List<MeasurementSchema> schemas, int maxRowNumber
this.deviceId = deviceId;
this.schemas = schemas;
this.maxRowNumber = maxRowNumber;
+ mschemawithindex=new HashMap<>();
+
+ for(int i=0;i<schemas.size();i++){
+ mschemawithindex.put(schemas.get(i),i);
+ }
createColumns();
reset();
}
+ public void addTimestamp(int rowIndex, long timestamp) {
+ timestamps[rowIndex] = timestamp;
+ }
+
+ public void addValue(MeasurementSchema measurementSchema, int rowIndex, Object value) {
+ int indexOfValue =mschemawithindex.get(measurementSchema);
+
+ if (measurementSchema.getType() == INT64) {
Review comment:
Thank you. I'll improve it
----------------------------------------------------------------
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:
users@infra.apache.org