You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by su...@apache.org on 2021/11/10 06:23:07 UTC
[iotdb] branch new_vector updated: Fix test
This is an automated email from the ASF dual-hosted git repository.
sunzesong pushed a commit to branch new_vector
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/new_vector by this push:
new 5fb1a7a Fix test
5fb1a7a is described below
commit 5fb1a7a16794987c1649adb1a6d9a79710593a99
Author: samperson1997 <sz...@mails.tsinghua.edu.cn>
AuthorDate: Wed Nov 10 14:20:24 2021 +0800
Fix test
---
.../tsfile/write/MetadataIndexConstructorTest.java | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
diff --git a/tsfile/src/test/java/org/apache/iotdb/tsfile/write/MetadataIndexConstructorTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/MetadataIndexConstructorTest.java
index 4f4e81a..985988c 100644
--- a/tsfile/src/test/java/org/apache/iotdb/tsfile/write/MetadataIndexConstructorTest.java
+++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/MetadataIndexConstructorTest.java
@@ -161,7 +161,7 @@ public class MetadataIndexConstructorTest {
test(devices, vectorMeasurement, singleMeasurement);
}
- /** Example 5: 1 entities with 2 vectors, 9 measurements for each vector */
+ /** Example 5: 1 entities with 1 vector containing 9 measurements */
@Test
public void vectorIndexTest1() {
String[] devices = {"d0"};
@@ -169,29 +169,18 @@ public class MetadataIndexConstructorTest {
test(devices, vectorMeasurement, null);
}
- /** Example 6: 1 entities with 2 vectors, 15 measurements for each vector */
- @Test
- public void vectorIndexTest2() {
- String[] devices = {"d0"};
- int[][] vectorMeasurement = {{15, 15}};
- test(devices, vectorMeasurement, null);
- }
-
/**
- * Example 7: 2 entities, measurements of entities are shown in the following table
+ * Example 6: 2 entities, measurements of entities are shown in the following table
*
- * <p>d0.s0~s4 | d0.v0.(s0~s8) | d0.z0~z3 d1.s0~s14 | d1.v0.(s0~s3)
+ * <p>d0.s0~s4 | d0.z0~z3 | d1.v0.(s0~s3)
*/
@Test
public void compositeIndexTest() {
String[] devices = {"d0", "d1"};
- int[][] vectorMeasurement = {{9}, {4}};
+ int[][] vectorMeasurement = {{}, {4}};
String[][] singleMeasurement = {
{"s0", "s1", "s2", "s3", "s4", "z0", "z1", "z2", "z3"},
- {
- "s00", "s01", "s02", "s03", "s04", "s05", "s06", "s07", "s08", "s09", "s10", "s11", "s12",
- "s13", "s14"
- }
+ {}
};
test(devices, vectorMeasurement, singleMeasurement);
}
@@ -316,7 +305,6 @@ public class MetadataIndexConstructorTest {
endOffset = node.getChildren().get(i + 1).getOffset();
}
if (node.getNodeType().equals(MetadataIndexNodeType.LEAF_MEASUREMENT)) {
- // 把每个叶子节点的第一个加进来
measurements.get(deviceIndex).add(metadataIndexEntry.getName());
} else if (node.getNodeType().equals(MetadataIndexNodeType.INTERNAL_MEASUREMENT)) {
MetadataIndexNode subNode =