Skip to content

Commit 46e9797

Browse files
committed
fix
1 parent e1b466b commit 46e9797

File tree

5 files changed

+21
-23
lines changed

5 files changed

+21
-23
lines changed

iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/consensus/request/ConfigPhysicalPlanSerDeTest.java

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -928,16 +928,15 @@ public void SetPipeStatusPlanTest() throws IOException {
928928
public void CreatePipePlanV2Test() throws IOException {
929929
final Map<String, String> sourceAttributes = new HashMap<>();
930930
final Map<String, String> processorAttributes = new HashMap<>();
931-
final Map<String, String> connectorAttributes = new HashMap<>();
932-
sourceAttributes.put("extractor", "org.apache.iotdb.pipe.extractor.DefaultExtractor");
931+
final Map<String, String> sinkAttributes = new HashMap<>();
932+
sourceAttributes.put("source", "org.apache.iotdb.pipe.source.DefaultExtractor");
933933
processorAttributes.put("processor", "org.apache.iotdb.pipe.processor.SDTFilterProcessor");
934-
connectorAttributes.put("connector", "org.apache.iotdb.pipe.protocol.ThriftTransporter");
934+
sinkAttributes.put("sink", "org.apache.iotdb.pipe.protocol.ThriftTransporter");
935935
final PipeTaskMeta pipeTaskMeta = new PipeTaskMeta(MinimumProgressIndex.INSTANCE, 1);
936936
ConcurrentMap<Integer, PipeTaskMeta> pipeTasks = new ConcurrentHashMap<>();
937937
pipeTasks.put(1, pipeTaskMeta);
938938
final PipeStaticMeta pipeStaticMeta =
939-
new PipeStaticMeta(
940-
"testPipe", 121, sourceAttributes, processorAttributes, connectorAttributes);
939+
new PipeStaticMeta("testPipe", 121, sourceAttributes, processorAttributes, sinkAttributes);
941940
final PipeRuntimeMeta pipeRuntimeMeta = new PipeRuntimeMeta(pipeTasks);
942941
final CreatePipePlanV2 createPipePlanV2 = new CreatePipePlanV2(pipeStaticMeta, pipeRuntimeMeta);
943942
final CreatePipePlanV2 createPipePlanV21 =
@@ -951,18 +950,17 @@ public void CreatePipePlanV2Test() throws IOException {
951950

952951
@Test
953952
public void AlterPipePlanV2Test() throws IOException {
954-
final Map<String, String> extractorAttributes = new HashMap<>();
953+
final Map<String, String> sourceAttributes = new HashMap<>();
955954
final Map<String, String> processorAttributes = new HashMap<>();
956-
final Map<String, String> connectorAttributes = new HashMap<>();
957-
extractorAttributes.put("pattern", "root.db");
955+
final Map<String, String> sinkAttributes = new HashMap<>();
956+
sourceAttributes.put("pattern", "root.db");
958957
processorAttributes.put("processor", "do-nothing-processor");
959-
connectorAttributes.put("batch.enable", "false");
958+
sinkAttributes.put("batch.enable", "false");
960959
final PipeTaskMeta pipeTaskMeta = new PipeTaskMeta(MinimumProgressIndex.INSTANCE, 1);
961960
final ConcurrentMap<Integer, PipeTaskMeta> pipeTasks = new ConcurrentHashMap<>();
962961
pipeTasks.put(1, pipeTaskMeta);
963962
final PipeStaticMeta pipeStaticMeta =
964-
new PipeStaticMeta(
965-
"testPipe", 121, extractorAttributes, processorAttributes, connectorAttributes);
963+
new PipeStaticMeta("testPipe", 121, sourceAttributes, processorAttributes, sinkAttributes);
966964
final PipeRuntimeMeta pipeRuntimeMeta = new PipeRuntimeMeta(pipeTasks);
967965
final AlterPipePlanV2 alterPipePlanV2 = new AlterPipePlanV2(pipeStaticMeta, pipeRuntimeMeta);
968966
final AlterPipePlanV2 alterPipePlanV21 =
@@ -1093,7 +1091,7 @@ public void pipeHandleMetaChangePlanTest() throws IOException {
10931091
123L,
10941092
new HashMap<String, String>() {
10951093
{
1096-
put("extractor-key", "extractor-value");
1094+
put("source-key", "source-value");
10971095
}
10981096
},
10991097
new HashMap<String, String>() {

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/container/MNodeChildBufferTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ public void testMNodeChildBuffer() {
4444

4545
ICachedMNode speedNode =
4646
rootNode
47-
.addChild(nodeFactory.createInternalMNode(null, "sg1"))
47+
.addChild(nodeFactory.createInternalMNode(null, "db1"))
4848
.addChild(nodeFactory.createInternalMNode(null, "device"))
4949
.addChild(nodeFactory.createInternalMNode(null, "speed"));
5050
assertEquals("root.db1.device.speed", speedNode.getFullPath());
5151

5252
ICachedMNode temperatureNode =
5353
rootNode
54-
.getChild("sg1")
54+
.getChild("db1")
5555
.addChild(nodeFactory.createInternalMNode(null, "device11"))
5656
.addChild(nodeFactory.createInternalMNode(null, "temperature"));
5757
assertEquals("root.db1.device11.temperature", temperatureNode.getFullPath());

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/mnode/MNodeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void testAddChild() {
3737

3838
IMemMNode speedNode =
3939
rootNode
40-
.addChild(nodeFactory.createInternalMNode(null, "sg1"))
40+
.addChild(nodeFactory.createInternalMNode(null, "db1"))
4141
.addChild(nodeFactory.createInternalMNode(null, "a"))
4242
.addChild(nodeFactory.createInternalMNode(null, "b"))
4343
.addChild(nodeFactory.createInternalMNode(null, "c"))
@@ -48,7 +48,7 @@ public void testAddChild() {
4848

4949
IMemMNode temperatureNode =
5050
rootNode
51-
.getChild("sg1")
51+
.getChild("db1")
5252
.addChild(nodeFactory.createInternalMNode(null, "aa"))
5353
.addChild(nodeFactory.createInternalMNode(null, "bb"))
5454
.addChild(nodeFactory.createInternalMNode(null, "cc"))

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/analyze/AnalyzeTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ public void testDataPartitionAnalyze() {
657657
.getDataPartitionInfo()
658658
.getDataPartitionMap()
659659
.get("root.db")
660-
.get(new TSeriesPartitionSlot(1107))
660+
.get(new TSeriesPartitionSlot(9133))
661661
.size());
662662
}
663663

@@ -737,7 +737,7 @@ public void testSelectIntoPath() throws IllegalPathException {
737737
new Pair("root.db.d1.s1", new PartialPath("root.db.d1.s1_1")),
738738
new Pair("root.db.d1.s2", new PartialPath("root.db.d1.s2_2")),
739739
new Pair("root.db.d2.s1", new PartialPath("root.db.d2_2.s3_3")),
740-
new Pair("root.db.d2.s2", new PartialPath("root.backup_sg.d2.s4"))),
740+
new Pair("root.db.d2.s2", new PartialPath("root.backup_db.d2.s4"))),
741741
Arrays.asList(
742742
new Pair("root.db.d1.s1", new PartialPath("root.db_bk.new_d1.s1")),
743743
new Pair("root.db.d1.s2", new PartialPath("root.db_bk.new_d1.s2"))),
@@ -1034,7 +1034,7 @@ public void testAlias2() {
10341034
"alias 'a' can only be matched with one time series");
10351035
}
10361036

1037-
private void assertTestFail(String sql, String errMsg) {
1037+
private void assertTestFail(String sql, String errMdb) {
10381038
try {
10391039
Statement statement =
10401040
StatementGenerator.createStatement(sql, ZonedDateTime.now().getOffset());
@@ -1044,7 +1044,7 @@ private void assertTestFail(String sql, String errMsg) {
10441044
analyzer.analyze(statement);
10451045
fail("No exception!");
10461046
} catch (Exception e) {
1047-
Assert.assertTrue(e.getMessage(), e.getMessage().contains(errMsg));
1047+
Assert.assertTrue(e.getMessage(), e.getMessage().contains(errMdb));
10481048
}
10491049
}
10501050

iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/parser/StatementGeneratorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public void testRawDataQuery() throws IllegalPathException {
157157
Statement statement = StatementGenerator.createStatement(req);
158158
QueryStatement queryStatement = (QueryStatement) statement;
159159
assertEquals(
160-
Arrays.asList(new PartialPath("root.db.d1.s2"), new PartialPath("root.db.d1.s1")),
160+
Arrays.asList(new PartialPath("root.db.d1.s1"), new PartialPath("root.db.d1.s2")),
161161
queryStatement.getPaths());
162162
assertEquals(
163163
new LogicAndExpression(
@@ -175,7 +175,7 @@ public void testLastDataQuery() throws IllegalPathException {
175175
Statement statement = StatementGenerator.createStatement(req);
176176
QueryStatement queryStatement = (QueryStatement) statement;
177177
assertEquals(
178-
Arrays.asList(new PartialPath("root.db.d1.s2"), new PartialPath("root.db.d1.s1")),
178+
Arrays.asList(new PartialPath("root.db.d1.s1"), new PartialPath("root.db.d1.s2")),
179179
queryStatement.getPaths());
180180
assertEquals(
181181
new GreaterEqualExpression(
@@ -194,7 +194,7 @@ public void testAggregationQuery() throws IllegalPathException {
194194
Statement statement = StatementGenerator.createStatement(req);
195195
QueryStatement queryStatement = (QueryStatement) statement;
196196
assertEquals(
197-
Arrays.asList(new PartialPath("root.db.d1.s2"), new PartialPath("root.db.d1.s1")),
197+
Arrays.asList(new PartialPath("root.db.d1.s1"), new PartialPath("root.db.d1.s2")),
198198
queryStatement.getPaths());
199199
assertEquals(
200200
new ResultColumn(

0 commit comments

Comments
 (0)