|
30 | 30 |
|
31 | 31 | import org.apache.tsfile.enums.TSDataType; |
32 | 32 | import org.apache.tsfile.write.record.Tablet; |
33 | | -import org.apache.tsfile.write.schema.IMeasurementSchema; |
34 | 33 | import org.apache.tsfile.write.schema.MeasurementSchema; |
35 | 34 | import org.junit.AfterClass; |
36 | 35 | import org.junit.Assert; |
@@ -249,20 +248,21 @@ public void testStreamingQueryMemTableWithOverlappedData2() |
249 | 248 | private static void generateTimeRangeWithTimestamp( |
250 | 249 | ISession session, String device, long start, long end) |
251 | 250 | throws IoTDBConnectionException, StatementExecutionException { |
252 | | - List<IMeasurementSchema> measurementSchemas = |
| 251 | + List<MeasurementSchema> measurementSchemas = |
253 | 252 | Collections.singletonList(new MeasurementSchema("s1", TSDataType.INT64)); |
254 | 253 | Tablet tablet = new Tablet(device, measurementSchemas); |
255 | 254 | for (long currentTime = start; currentTime <= end; currentTime++) { |
256 | | - int rowIndex = tablet.getRowSize(); |
| 255 | + int rowIndex = tablet.rowSize; |
257 | 256 | if (rowIndex == tablet.getMaxRowNumber()) { |
258 | 257 | session.insertTablet(tablet); |
259 | 258 | tablet.reset(); |
260 | 259 | rowIndex = 0; |
261 | 260 | } |
262 | 261 | tablet.addTimestamp(rowIndex, currentTime); |
263 | | - tablet.addValue(rowIndex, 0, currentTime); |
| 262 | + tablet.addValue("s1", 0, currentTime); |
| 263 | + tablet.rowSize++; |
264 | 264 | } |
265 | | - if (tablet.getRowSize() > 0) { |
| 265 | + if (tablet.rowSize > 0) { |
266 | 266 | session.insertTablet(tablet); |
267 | 267 | } |
268 | 268 | } |
|
0 commit comments