You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2024/09/09 03:42:57 UTC

(iotdb) branch fix_table_name_serde created (now c18752487da)

This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a change to branch fix_table_name_serde
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at c18752487da Fix table name serialization for table-model insertion

This branch includes the following new commits:

     new c18752487da Fix table name serialization for table-model insertion

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(iotdb) 01/01: Fix table name serialization for table-model insertion

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch fix_table_name_serde
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit c18752487da9492bbff95e25d0f8e186bf82477a
Author: Tian Jiang <jt...@163.com>
AuthorDate: Mon Sep 9 11:41:50 2024 +0800

    Fix table name serialization for table-model insertion
    
    (cherry picked from commit ef2a01e95e0c8e4b024f038d672cc04994daa5aa)
---
 .../dataregion/DataExecutionVisitor.java           |   8 +-
 .../dataregion/DataRegionStateMachine.java         |   2 +-
 .../tablet/PipeInsertNodeTabletInsertionEvent.java |   6 +-
 .../tablet/TabletInsertionDataContainer.java       |   4 +-
 .../event/realtime/PipeRealtimeEventFactory.java   |   2 +-
 .../visitor/PipePlanToStatementVisitor.java        |   2 +-
 .../plan/node/pipe/PipeEnrichedInsertNode.java     |   8 +-
 .../plan/planner/plan/node/write/InsertNode.java   |  33 ++-
 .../planner/plan/node/write/InsertRowNode.java     |  21 +-
 .../planner/plan/node/write/InsertRowsNode.java    |   2 +-
 .../plan/node/write/InsertRowsOfOneDeviceNode.java |  12 +-
 .../planner/plan/node/write/InsertTabletNode.java  |  24 +--
 .../plan/node/write/RelationalInsertRowNode.java   |  20 +-
 .../plan/node/write/RelationalInsertRowsNode.java  |   2 +-
 .../node/write/RelationalInsertTabletNode.java     |  13 +-
 .../plan/statement/crud/InsertTabletStatement.java |   2 +-
 .../db/storageengine/dataregion/DataRegion.java    |  10 +-
 .../db/trigger/executor/TriggerFireVisitor.java    |   8 +-
 .../node/write/InsertRowsNodeSerdeTest.java        | 228 +++++++++++----------
 .../write/InsertRowsOfOneDeviceNodeSerdeTest.java  |   2 +-
 .../node/write/InsertTabletNodeSerdeTest.java      |  86 ++++----
 .../planner/node/write/WritePlanNodeSplitTest.java |  28 +--
 .../wal/node/ConsensusReqReaderTest.java           |   2 +-
 23 files changed, 277 insertions(+), 248 deletions(-)

diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java
index 839d3017abe..bc9bb202242 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataExecutionVisitor.java
@@ -110,7 +110,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
     } catch (BatchProcessException e) {
       LOGGER.warn(
           "Batch failure in executing a InsertTabletNode. device: {}, startTime: {}, measurements: {}, failing status: {}",
-          node.getDevicePath(),
+          node.getTargetPath(),
           node.getTimes()[0],
           node.getMeasurements(),
           e.getFailingStatus());
@@ -149,7 +149,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
         }
         LOGGER.warn(
             "Insert row failed. device: {}, time: {}, measurements: {}, failing status: {}",
-            insertRowNode.getDevicePath(),
+            insertRowNode.getTargetPath(),
             insertRowNode.getTime(),
             insertRowNode.getMeasurements(),
             failedEntry.getValue());
@@ -180,7 +180,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
         }
         LOGGER.warn(
             "Insert tablet failed. device: {}, startTime: {}, measurements: {}, failing status: {}",
-            insertTabletNode.getDevicePath(),
+            insertTabletNode.getTargetPath(),
             insertTabletNode.getTimes()[0],
             insertTabletNode.getMeasurements(),
             failedEntry.getValue());
@@ -217,7 +217,7 @@ public class DataExecutionVisitor extends PlanVisitor<TSStatus, DataRegion> {
         }
         LOGGER.warn(
             "Insert row failed. device: {}, time: {}, measurements: {}, failing status: {}",
-            insertRowNode.getDevicePath(),
+            insertRowNode.getTargetPath(),
             insertRowNode.getTime(),
             insertRowNode.getMeasurements(),
             failedEntry.getValue());
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java
index 3236199aa5c..24f60cc806c 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/dataregion/DataRegionStateMachine.java
@@ -279,7 +279,7 @@ public class DataRegionStateMachine extends BaseStateMachine {
             "Unsupported node type " + insertNodes.get(0).getType());
     }
     result.setSearchIndex(insertNodes.get(0).getSearchIndex());
-    result.setDevicePath(insertNodes.get(0).getDevicePath());
+    result.setTargetPath(insertNodes.get(0).getTargetPath());
     return result;
   }
 
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java
index 45f8b70a825..676f9a048e4 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/PipeInsertNodeTabletInsertionEvent.java
@@ -254,7 +254,7 @@ public class PipeInsertNodeTabletInsertionEvent extends EnrichedEvent
       }
 
       if (insertNode instanceof InsertRowNode || insertNode instanceof InsertTabletNode) {
-        final PartialPath devicePartialPath = insertNode.getDevicePath();
+        final PartialPath devicePartialPath = insertNode.getTargetPath();
         return Objects.isNull(devicePartialPath)
             || pipePattern.mayOverlapWithDevice(devicePartialPath.getIDeviceIDAsFullDevice());
       }
@@ -264,9 +264,9 @@ public class PipeInsertNodeTabletInsertionEvent extends EnrichedEvent
             .getInsertRowNodeList().stream()
                 .anyMatch(
                     insertRowNode ->
-                        Objects.isNull(insertRowNode.getDevicePath())
+                        Objects.isNull(insertRowNode.getTargetPath())
                             || pipePattern.mayOverlapWithDevice(
-                                insertRowNode.getDevicePath().getIDeviceIDAsFullDevice()));
+                                insertRowNode.getTargetPath().getIDeviceIDAsFullDevice()));
       }
 
       return true;
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
index c02b71af2d5..0cb910a7baf 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
@@ -145,7 +145,7 @@ public class TabletInsertionDataContainer {
     final Integer[] originColumnIndex2FilteredColumnIndexMapperList = new Integer[originColumnSize];
 
     // The full path is always cached when device path is deserialized
-    this.deviceStr = insertRowNode.getDevicePath().getFullPath();
+    this.deviceStr = insertRowNode.getTargetPath().getFullPath();
     this.deviceId = insertRowNode.getDeviceID();
     this.isAligned = insertRowNode.isAligned();
 
@@ -214,7 +214,7 @@ public class TabletInsertionDataContainer {
     final Integer[] originColumnIndex2FilteredColumnIndexMapperList = new Integer[originColumnSize];
 
     // The full path is always cached when device path is deserialized
-    this.deviceStr = insertTabletNode.getDevicePath().getFullPath();
+    this.deviceStr = insertTabletNode.getTargetPath().getFullPath();
     this.deviceId = insertTabletNode.getDeviceID();
     this.isAligned = insertTabletNode.isAligned();
 
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEventFactory.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEventFactory.java
index 1dd86e1e5d8..3c3023c58ee 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEventFactory.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/realtime/PipeRealtimeEventFactory.java
@@ -47,7 +47,7 @@ public class PipeRealtimeEventFactory {
     return TS_FILE_EPOCH_MANAGER.bindPipeInsertNodeTabletInsertionEvent(
         new PipeInsertNodeTabletInsertionEvent(
             walEntryHandler,
-            insertNode.getDevicePath(),
+            insertNode.getTargetPath(),
             insertNode.getProgressIndex(),
             insertNode.isAligned(),
             insertNode.isGeneratedByPipe()),
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java
index 3ca0fa90394..83121432e30 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/receiver/visitor/PipePlanToStatementVisitor.java
@@ -77,7 +77,7 @@ public class PipePlanToStatementVisitor extends PlanVisitor<Statement, Void> {
   @Override
   public InsertRowStatement visitInsertRow(final InsertRowNode node, final Void context) {
     final InsertRowStatement statement = new InsertRowStatement();
-    statement.setDevicePath(node.getDevicePath());
+    statement.setDevicePath(node.getTargetPath());
     statement.setTime(node.getTime());
     statement.setMeasurements(node.getMeasurements());
     statement.setDataTypes(node.getDataTypes());
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/pipe/PipeEnrichedInsertNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/pipe/PipeEnrichedInsertNode.java
index 6ea566053ac..422086d1aed 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/pipe/PipeEnrichedInsertNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/pipe/PipeEnrichedInsertNode.java
@@ -155,13 +155,13 @@ public class PipeEnrichedInsertNode extends InsertNode {
   }
 
   @Override
-  public PartialPath getDevicePath() {
-    return insertNode.getDevicePath();
+  public PartialPath getTargetPath() {
+    return insertNode.getTargetPath();
   }
 
   @Override
-  public void setDevicePath(PartialPath devicePath) {
-    insertNode.setDevicePath(devicePath);
+  public void setTargetPath(PartialPath targetPath) {
+    insertNode.setTargetPath(targetPath);
   }
 
   @Override
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertNode.java
index f18de9ef2b9..50755a53fd7 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertNode.java
@@ -22,12 +22,14 @@ package org.apache.iotdb.db.queryengine.plan.planner.plan.node.write;
 import org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet;
 import org.apache.iotdb.commons.consensus.index.ComparableConsensusRequest;
 import org.apache.iotdb.commons.consensus.index.ProgressIndex;
+import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.commons.path.PartialPath;
 import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory;
 import org.apache.iotdb.commons.utils.TestOnly;
 import org.apache.iotdb.consensus.ConsensusFactory;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
+import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNode;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeId;
 import org.apache.iotdb.db.storageengine.dataregion.memtable.DeviceIDFactory;
@@ -37,6 +39,7 @@ import org.apache.iotdb.db.storageengine.dataregion.wal.utils.WALWriteUtils;
 import org.apache.tsfile.enums.TSDataType;
 import org.apache.tsfile.exception.NotImplementedException;
 import org.apache.tsfile.file.metadata.IDeviceID;
+import org.apache.tsfile.utils.ReadWriteIOUtils;
 import org.apache.tsfile.write.schema.MeasurementSchema;
 
 import java.io.DataInputStream;
@@ -56,8 +59,9 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
   /**
    * if use id table, this filed is id form of device path <br>
    * if not, this filed is device path<br>
+   * or table name for table-model insertions.
    */
-  protected PartialPath devicePath;
+  protected PartialPath targetPath;
 
   protected boolean isAligned;
   protected MeasurementSchema[] measurementSchemas;
@@ -106,7 +110,7 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
       TSDataType[] dataTypes,
       TsTableColumnCategory[] columnCategories) {
     super(id);
-    this.devicePath = devicePath;
+    this.targetPath = devicePath;
     this.isAligned = isAligned;
     this.measurements = measurements;
     this.dataTypes = dataTypes;
@@ -121,12 +125,12 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
     this.dataRegionReplicaSet = dataRegionReplicaSet;
   }
 
-  public PartialPath getDevicePath() {
-    return devicePath;
+  public PartialPath getTargetPath() {
+    return targetPath;
   }
 
-  public void setDevicePath(PartialPath devicePath) {
-    this.devicePath = devicePath;
+  public void setTargetPath(PartialPath targetPath) {
+    this.targetPath = targetPath;
   }
 
   public boolean isAligned() {
@@ -197,7 +201,7 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
 
   public IDeviceID getDeviceID() {
     if (deviceID == null) {
-      deviceID = deviceIDFactory.getDeviceID(devicePath);
+      deviceID = deviceIDFactory.getDeviceID(targetPath);
     }
     return deviceID;
   }
@@ -346,7 +350,7 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
     }
     InsertNode that = (InsertNode) o;
     return isAligned == that.isAligned
-        && Objects.equals(devicePath, that.devicePath)
+        && Objects.equals(targetPath, that.targetPath)
         && Arrays.equals(measurementSchemas, that.measurementSchemas)
         && Arrays.equals(measurements, that.measurements)
         && Arrays.equals(dataTypes, that.dataTypes)
@@ -357,7 +361,7 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
   @Override
   public int hashCode() {
     int result =
-        Objects.hash(super.hashCode(), devicePath, isAligned, deviceID, dataRegionReplicaSet);
+        Objects.hash(super.hashCode(), targetPath, isAligned, deviceID, dataRegionReplicaSet);
     result = 31 * result + Arrays.hashCode(measurementSchemas);
     result = 31 * result + Arrays.hashCode(measurements);
     result = 31 * result + Arrays.hashCode(dataTypes);
@@ -388,4 +392,15 @@ public abstract class InsertNode extends SearchNode implements ComparableConsens
   public List<PlanNode> getChildren() {
     return Collections.emptyList();
   }
+
+  protected PartialPath readTargetPath(ByteBuffer buffer) throws IllegalPathException {
+    return DataNodeDevicePathCache.getInstance()
+        .getPartialPath(ReadWriteIOUtils.readString(buffer));
+  }
+
+  protected PartialPath readTargetPath(DataInputStream stream)
+      throws IllegalPathException, IOException {
+    return DataNodeDevicePathCache.getInstance()
+        .getPartialPath(ReadWriteIOUtils.readString(stream));
+  }
 }
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java
index 464e807ebab..b4b25af6193 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowNode.java
@@ -25,7 +25,6 @@ import org.apache.iotdb.commons.path.PartialPath;
 import org.apache.iotdb.commons.utils.TestOnly;
 import org.apache.iotdb.commons.utils.TimePartitionUtils;
 import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis;
-import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNode;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeId;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeType;
@@ -227,13 +226,13 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
 
   void subSerialize(ByteBuffer buffer) {
     ReadWriteIOUtils.write(time, buffer);
-    ReadWriteIOUtils.write(devicePath.getFullPath(), buffer);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), buffer);
     serializeMeasurementsAndValues(buffer);
   }
 
   void subSerialize(DataOutputStream stream) throws IOException {
     ReadWriteIOUtils.write(time, stream);
-    ReadWriteIOUtils.write(devicePath.getFullPath(), stream);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), stream);
     serializeMeasurementsAndValues(stream);
   }
 
@@ -427,9 +426,7 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
   void subDeserialize(ByteBuffer byteBuffer) {
     time = byteBuffer.getLong();
     try {
-      devicePath =
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath(ReadWriteIOUtils.readString(byteBuffer));
+      targetPath = readTargetPath(byteBuffer);
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException(DESERIALIZE_ERROR, e);
     }
@@ -526,7 +523,7 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
   protected int subSerializeSize() {
     int size = 0;
     size += Long.BYTES;
-    size += ReadWriteIOUtils.sizeToWrite(devicePath.getFullPath());
+    size += ReadWriteIOUtils.sizeToWrite(targetPath.getFullPath());
     return size + serializeMeasurementsAndValuesSize();
   }
 
@@ -596,7 +593,7 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
 
   protected void subSerialize(IWALByteBufferView buffer) {
     buffer.putLong(time);
-    WALWriteUtils.write(devicePath.getFullPath(), buffer);
+    WALWriteUtils.write(targetPath.getFullPath(), buffer);
     serializeMeasurementsAndValues(buffer);
   }
 
@@ -679,9 +676,7 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
     InsertRowNode insertNode = new InsertRowNode(new PlanNodeId(""));
     insertNode.setTime(stream.readLong());
     try {
-      insertNode.setDevicePath(
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath(ReadWriteIOUtils.readString(stream)));
+      insertNode.setTargetPath(insertNode.readTargetPath(stream));
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException(DESERIALIZE_ERROR, e);
     }
@@ -771,9 +766,7 @@ public class InsertRowNode extends InsertNode implements WALEntryValue {
     InsertRowNode insertNode = new InsertRowNode(new PlanNodeId(""));
     insertNode.setTime(buffer.getLong());
     try {
-      insertNode.setDevicePath(
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath(ReadWriteIOUtils.readString(buffer)));
+      insertNode.setTargetPath(insertNode.readTargetPath(buffer));
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException(DESERIALIZE_ERROR, e);
     }
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsNode.java
index b47cc1ea77f..5ab9508e973 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsNode.java
@@ -248,7 +248,7 @@ public class InsertRowsNode extends InsertNode implements WALEntryValue {
           analysis
               .getDataPartitionInfo()
               .getDataRegionReplicaSetForWriting(
-                  insertRowNode.devicePath.getIDeviceIDAsFullDevice(),
+                  insertRowNode.targetPath.getIDeviceIDAsFullDevice(),
                   TimePartitionUtils.getTimePartitionSlot(insertRowNode.getTime()),
                   null);
       // Collect redirectInfo
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsOfOneDeviceNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsOfOneDeviceNode.java
index c9de66c7aa8..b5e56986681 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsOfOneDeviceNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertRowsOfOneDeviceNode.java
@@ -121,7 +121,7 @@ public class InsertRowsOfOneDeviceNode extends InsertNode {
       return;
     }
 
-    devicePath = insertRowNodeList.get(0).getDevicePath();
+    targetPath = insertRowNodeList.get(0).getTargetPath();
     isAligned = insertRowNodeList.get(0).isAligned;
     storeMeasurementsAndDataType();
   }
@@ -165,7 +165,7 @@ public class InsertRowsOfOneDeviceNode extends InsertNode {
           analysis
               .getDataPartitionInfo()
               .getDataRegionReplicaSetForWriting(
-                  devicePath.getIDeviceIDAsFullDevice(),
+                  targetPath.getIDeviceIDAsFullDevice(),
                   timePartitionSlot,
                   analysis.getDatabaseName());
       Map<TTimePartitionSlot, List<InsertRowNode>> tmpMap =
@@ -237,7 +237,7 @@ public class InsertRowsOfOneDeviceNode extends InsertNode {
     int size = byteBuffer.getInt();
     for (int i = 0; i < size; i++) {
       InsertRowNode insertRowNode = new InsertRowNode(new PlanNodeId(""));
-      insertRowNode.setDevicePath(devicePath);
+      insertRowNode.setTargetPath(devicePath);
       insertRowNode.setTime(byteBuffer.getLong());
       insertRowNode.deserializeMeasurementsAndValues(byteBuffer);
       insertRowNodeList.add(insertRowNode);
@@ -254,14 +254,14 @@ public class InsertRowsOfOneDeviceNode extends InsertNode {
     InsertRowsOfOneDeviceNode insertRowsOfOneDeviceNode = new InsertRowsOfOneDeviceNode(planNodeId);
     insertRowsOfOneDeviceNode.setInsertRowNodeList(insertRowNodeList);
     insertRowsOfOneDeviceNode.setInsertRowNodeIndexList(insertRowNodeIndex);
-    insertRowsOfOneDeviceNode.setDevicePath(devicePath);
+    insertRowsOfOneDeviceNode.setTargetPath(devicePath);
     return insertRowsOfOneDeviceNode;
   }
 
   @Override
   protected void serializeAttributes(ByteBuffer byteBuffer) {
     PlanNodeType.INSERT_ROWS_OF_ONE_DEVICE.serialize(byteBuffer);
-    ReadWriteIOUtils.write(devicePath.getFullPath(), byteBuffer);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), byteBuffer);
 
     ReadWriteIOUtils.write(insertRowNodeList.size(), byteBuffer);
 
@@ -277,7 +277,7 @@ public class InsertRowsOfOneDeviceNode extends InsertNode {
   @Override
   protected void serializeAttributes(DataOutputStream stream) throws IOException {
     PlanNodeType.INSERT_ROWS_OF_ONE_DEVICE.serialize(stream);
-    ReadWriteIOUtils.write(devicePath.getFullPath(), stream);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), stream);
 
     ReadWriteIOUtils.write(insertRowNodeList.size(), stream);
 
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java
index 9a35947edf2..d40d1c50b84 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/InsertTabletNode.java
@@ -29,7 +29,6 @@ import org.apache.iotdb.commons.utils.TestOnly;
 import org.apache.iotdb.commons.utils.TimePartitionUtils;
 import org.apache.iotdb.db.exception.query.OutOfTTLException;
 import org.apache.iotdb.db.queryengine.plan.analyze.IAnalysis;
-import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNode;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeId;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeType;
@@ -305,7 +304,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
     BitMap[] newBitMaps = this.bitMaps == null ? null : initBitmaps(dataTypes.length, count);
     return new InsertTabletNode(
         getPlanNodeId(),
-        devicePath,
+        targetPath,
         isAligned,
         measurements,
         dataTypes,
@@ -438,7 +437,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
   }
 
   void subSerialize(ByteBuffer buffer) {
-    ReadWriteIOUtils.write(devicePath.getFullPath(), buffer);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), buffer);
     writeMeasurementsOrSchemas(buffer);
     writeDataTypes(buffer);
     writeTimes(buffer);
@@ -448,7 +447,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
   }
 
   void subSerialize(DataOutputStream stream) throws IOException {
-    ReadWriteIOUtils.write(devicePath.getFullPath(), stream);
+    ReadWriteIOUtils.write(targetPath.getFullPath(), stream);
     writeMeasurementsOrSchemas(stream);
     writeDataTypes(stream);
     writeTimes(stream);
@@ -705,9 +704,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
 
   public void subDeserialize(ByteBuffer buffer) {
     try {
-      devicePath =
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath((ReadWriteIOUtils.readString(buffer)));
+      targetPath = readTargetPath(buffer);
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException("Cannot deserialize InsertTabletNode", e);
     }
@@ -763,7 +760,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
   int subSerializeSize(int start, int end) {
     int size = 0;
     size += Long.BYTES;
-    size += ReadWriteIOUtils.sizeToWrite(devicePath.getFullPath());
+    size += ReadWriteIOUtils.sizeToWrite(targetPath.getFullPath());
     // measurements size
     size += Integer.BYTES;
     size += serializeMeasurementSchemasSize();
@@ -849,7 +846,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
 
   void subSerialize(IWALByteBufferView buffer, int start, int end) {
     buffer.putLong(searchIndex);
-    WALWriteUtils.write(devicePath.getFullPath(), buffer);
+    WALWriteUtils.write(targetPath.getFullPath(), buffer);
     // data types are serialized in measurement schemas
     writeMeasurementSchemas(buffer);
     writeTimes(buffer, start, end);
@@ -969,8 +966,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
   protected void subDeserializeFromWAL(DataInputStream stream) throws IOException {
     searchIndex = stream.readLong();
     try {
-      devicePath =
-          DataNodeDevicePathCache.getInstance().getPartialPath(ReadWriteIOUtils.readString(stream));
+      targetPath = readTargetPath(stream);
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException("Cannot deserialize InsertTabletNode", e);
     }
@@ -1005,9 +1001,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
   protected void subDeserializeFromWAL(ByteBuffer buffer) {
     searchIndex = buffer.getLong();
     try {
-      devicePath =
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath((ReadWriteIOUtils.readString(buffer)));
+      targetPath = readTargetPath(buffer);
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException("Cannot deserialize InsertTabletNode", e);
     }
@@ -1191,7 +1185,7 @@ public class InsertTabletNode extends InsertNode implements WALEntryValue {
     if (deviceID != null) {
       return deviceID;
     }
-    deviceID = DeviceIDFactory.getInstance().getDeviceID(devicePath);
+    deviceID = DeviceIDFactory.getInstance().getDeviceID(targetPath);
     return deviceID;
   }
 
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowNode.java
index df9f9174ce9..cb3a6291622 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowNode.java
@@ -22,7 +22,6 @@ package org.apache.iotdb.db.queryengine.plan.planner.plan.node.write;
 import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.commons.path.PartialPath;
 import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory;
-import org.apache.iotdb.db.queryengine.plan.analyze.cache.schema.DataNodeDevicePathCache;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeId;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanNodeType;
 import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanVisitor;
@@ -141,9 +140,7 @@ public class RelationalInsertRowNode extends InsertRowNode {
     RelationalInsertRowNode insertNode = new RelationalInsertRowNode(new PlanNodeId(""));
     insertNode.setTime(stream.readLong());
     try {
-      insertNode.setDevicePath(
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath(ReadWriteIOUtils.readString(stream)));
+      insertNode.setTargetPath(insertNode.readTargetPath(stream));
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException(DESERIALIZE_ERROR, e);
     }
@@ -162,9 +159,7 @@ public class RelationalInsertRowNode extends InsertRowNode {
     RelationalInsertRowNode insertNode = new RelationalInsertRowNode(new PlanNodeId(""));
     insertNode.setTime(buffer.getLong());
     try {
-      insertNode.setDevicePath(
-          DataNodeDevicePathCache.getInstance()
-              .getPartialPath(ReadWriteIOUtils.readString(buffer)));
+      insertNode.setTargetPath(insertNode.readTargetPath(buffer));
     } catch (IllegalPathException e) {
       throw new IllegalArgumentException(DESERIALIZE_ERROR, e);
     }
@@ -228,6 +223,15 @@ public class RelationalInsertRowNode extends InsertRowNode {
   }
 
   public String getTableName() {
-    return devicePath.getFullPath();
+    return targetPath.getFullPath();
+  }
+
+  protected PartialPath readTargetPath(ByteBuffer buffer) throws IllegalPathException {
+    return new PartialPath(ReadWriteIOUtils.readString(buffer), false);
+  }
+
+  protected PartialPath readTargetPath(DataInputStream stream)
+      throws IllegalPathException, IOException {
+    return new PartialPath(ReadWriteIOUtils.readString(stream), false);
   }
 }
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowsNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowsNode.java
index b73bd42965c..768bb920905 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowsNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertRowsNode.java
@@ -151,7 +151,7 @@ public class RelationalInsertRowsNode extends InsertRowsNode {
   }
 
   public String getTableName() {
-    return devicePath.getFullPath();
+    return targetPath.getFullPath();
   }
 
   @Override
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java
index 3902c9ae9b1..c2129f8d8d7 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/write/RelationalInsertTabletNode.java
@@ -33,6 +33,7 @@ import org.apache.tsfile.file.metadata.IDeviceID;
 import org.apache.tsfile.file.metadata.IDeviceID.Factory;
 import org.apache.tsfile.utils.BitMap;
 import org.apache.tsfile.utils.Pair;
+import org.apache.tsfile.utils.ReadWriteIOUtils;
 import org.apache.tsfile.write.schema.MeasurementSchema;
 
 import java.io.DataInputStream;
@@ -126,7 +127,7 @@ public class RelationalInsertTabletNode extends InsertTabletNode {
     BitMap[] newBitMaps = this.bitMaps == null ? null : initBitmaps(dataTypes.length, count);
     return new RelationalInsertTabletNode(
         getPlanNodeId(),
-        devicePath,
+        targetPath,
         isAligned,
         measurements,
         dataTypes,
@@ -252,6 +253,14 @@ public class RelationalInsertTabletNode extends InsertTabletNode {
   }
 
   public String getTableName() {
-    return devicePath.getFullPath();
+    return targetPath.getFullPath();
+  }
+
+  protected PartialPath readTargetPath(ByteBuffer buffer) {
+    return new PartialPath(ReadWriteIOUtils.readString(buffer), false);
+  }
+
+  protected PartialPath readTargetPath(DataInputStream stream) throws IOException {
+    return new PartialPath(ReadWriteIOUtils.readString(stream), false);
   }
 }
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java
index 6029937d04c..6a70a5e5493 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/statement/crud/InsertTabletStatement.java
@@ -88,7 +88,7 @@ public class InsertTabletStatement extends InsertBaseStatement implements ISchem
 
   public InsertTabletStatement(InsertTabletNode node) {
     this();
-    setDevicePath(node.getDevicePath());
+    setDevicePath(node.getTargetPath());
     setMeasurements(node.getMeasurements());
     setTimes(node.getTimes());
     setColumns(node.getColumns());
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
index 65bd32095f2..ead04b82211 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/DataRegion.java
@@ -1018,7 +1018,7 @@ public class DataRegion implements IDataRegionForQuery {
   public void insert(InsertRowNode insertRowNode) throws WriteProcessException {
     // reject insertions that are out of ttl
     long deviceTTL =
-        DataNodeTTLCache.getInstance().getTTL(insertRowNode.getDevicePath().getNodes());
+        DataNodeTTLCache.getInstance().getTTL(insertRowNode.getTargetPath().getNodes());
     if (!CommonUtils.isAlive(insertRowNode.getTime(), deviceTTL)) {
       throw new OutOfTTLException(
           insertRowNode.getTime(), (CommonDateTimeUtils.currentTime() - deviceTTL));
@@ -1365,7 +1365,7 @@ public class DataRegion implements IDataRegionForQuery {
     DataNodeSchemaCache.getInstance()
         .updateLastCache(
             getDatabaseName(),
-            node.getDevicePath(),
+            node.getTargetPath(),
             rawMeasurements,
             node.getMeasurementSchemas(),
             node.isAligned(),
@@ -1410,7 +1410,7 @@ public class DataRegion implements IDataRegionForQuery {
     DataNodeSchemaCache.getInstance()
         .updateLastCache(
             getDatabaseName(),
-            node.getDevicePath(),
+            node.getTargetPath(),
             rawMeasurements,
             node.getMeasurementSchemas(),
             node.isAligned(),
@@ -1505,7 +1505,7 @@ public class DataRegion implements IDataRegionForQuery {
         DataNodeSchemaCache.getInstance()
             .updateLastCacheWithoutLock(
                 getDatabaseName(),
-                node.getDevicePath(),
+                node.getTargetPath(),
                 rawMeasurements,
                 node.getMeasurementSchemas(),
                 node.isAligned(),
@@ -3485,7 +3485,7 @@ public class DataRegion implements IDataRegionForQuery {
       }
       long deviceTTL =
           DataNodeTTLCache.getInstance()
-              .getTTL(insertRowsOfOneDeviceNode.getDevicePath().getNodes());
+              .getTTL(insertRowsOfOneDeviceNode.getTargetPath().getNodes());
       long[] costsForMetrics = new long[4];
       Map<TsFileProcessor, InsertRowsNode> tsFileProcessorMap = new HashMap<>();
       for (int i = 0; i < insertRowsOfOneDeviceNode.getInsertRowNodeList().size(); i++) {
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java
index 80f41592387..9e0458ebc07 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/trigger/executor/TriggerFireVisitor.java
@@ -115,7 +115,7 @@ public class TriggerFireVisitor extends PlanVisitor<TriggerFireResult, TriggerEv
               .map(measurement -> measurementSchemas[measurementToSchemaIndexMap.get(measurement)])
               .collect(Collectors.toList());
       // only one row
-      Tablet tablet = new Tablet(node.getDevicePath().getFullPath(), schemas, 1);
+      Tablet tablet = new Tablet(node.getTargetPath().getFullPath(), schemas, 1);
       // add one row
       tablet.rowSize++;
       tablet.addTimestamp(0, time);
@@ -166,7 +166,7 @@ public class TriggerFireVisitor extends PlanVisitor<TriggerFireResult, TriggerEv
         // all measurements are included
         tablet =
             new Tablet(
-                node.getDevicePath().getFullPath(),
+                node.getTargetPath().getFullPath(),
                 Arrays.asList(measurementSchemas),
                 timestamps,
                 columns,
@@ -192,7 +192,7 @@ public class TriggerFireVisitor extends PlanVisitor<TriggerFireResult, TriggerEv
         }
         tablet =
             new Tablet(
-                node.getDevicePath().getFullPath(),
+                node.getTargetPath().getFullPath(),
                 schemas,
                 timestamps,
                 columnsOfNewTablet,
@@ -291,7 +291,7 @@ public class TriggerFireVisitor extends PlanVisitor<TriggerFireResult, TriggerEv
 
   private Map<String, List<String>> constructTriggerNameToMeasurementListMap(
       InsertNode node, TriggerEvent event) {
-    PartialPath device = node.getDevicePath();
+    PartialPath device = node.getTargetPath();
     List<String> measurements = new ArrayList<>();
     for (String measurement : node.getMeasurements()) {
       if (measurement != null) {
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsNodeSerdeTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsNodeSerdeTest.java
index c668a2898e4..0a8f3bc3939 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsNodeSerdeTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsNodeSerdeTest.java
@@ -149,129 +149,137 @@ public class InsertRowsNodeSerdeTest {
 
   @Test
   public void TestSerializeAndDeserializeRelational() throws IllegalPathException {
-    RelationalInsertRowsNode node = new RelationalInsertRowsNode(new PlanNodeId("plan node 1"));
-    node.addOneInsertRowNode(
-        new RelationalInsertRowNode(
-            new PlanNodeId("plan node 1"),
-            new PartialPath("root.sg.d1"),
-            false,
-            new String[] {"s1", "s2", "s3", "s4", "s5"},
-            new TSDataType[] {
-              TSDataType.DOUBLE,
-              TSDataType.FLOAT,
-              TSDataType.INT64,
-              TSDataType.TEXT,
-              TSDataType.STRING
-            },
-            1000L,
-            new Object[] {1.0, 2f, 300L, new Binary("444".getBytes(StandardCharsets.UTF_8)), null},
-            false,
-            new TsTableColumnCategory[] {
-              TsTableColumnCategory.ID,
-              TsTableColumnCategory.ATTRIBUTE,
-              TsTableColumnCategory.MEASUREMENT,
-              TsTableColumnCategory.MEASUREMENT,
-              TsTableColumnCategory.MEASUREMENT
-            }),
-        0);
+    for (String tableName : new String[] {"table1", "ta`ble1", "root.table1"}) {
+      RelationalInsertRowsNode node = new RelationalInsertRowsNode(new PlanNodeId("plan node 1"));
+      node.addOneInsertRowNode(
+          new RelationalInsertRowNode(
+              new PlanNodeId("plan node 1"),
+              new PartialPath(tableName, false),
+              false,
+              new String[] {"s1", "s2", "s3", "s4", "s5"},
+              new TSDataType[] {
+                TSDataType.DOUBLE,
+                TSDataType.FLOAT,
+                TSDataType.INT64,
+                TSDataType.TEXT,
+                TSDataType.STRING
+              },
+              1000L,
+              new Object[] {
+                1.0, 2f, 300L, new Binary("444".getBytes(StandardCharsets.UTF_8)), null
+              },
+              false,
+              new TsTableColumnCategory[] {
+                TsTableColumnCategory.ID,
+                TsTableColumnCategory.ATTRIBUTE,
+                TsTableColumnCategory.MEASUREMENT,
+                TsTableColumnCategory.MEASUREMENT,
+                TsTableColumnCategory.MEASUREMENT
+              }),
+          0);
 
-    node.addOneInsertRowNode(
-        new RelationalInsertRowNode(
-            new PlanNodeId("plan node 1"),
-            new PartialPath("root.sg.d2"),
-            false,
-            new String[] {"s1", "s4"},
-            new TSDataType[] {TSDataType.DOUBLE, TSDataType.BOOLEAN},
-            2000L,
-            new Object[] {2.0, false},
-            false,
-            new TsTableColumnCategory[] {
-              TsTableColumnCategory.ID,
-              TsTableColumnCategory.ATTRIBUTE,
-              TsTableColumnCategory.MEASUREMENT
-            }),
-        1);
+      node.addOneInsertRowNode(
+          new RelationalInsertRowNode(
+              new PlanNodeId("plan node 1"),
+              new PartialPath(tableName, false),
+              false,
+              new String[] {"s1", "s4"},
+              new TSDataType[] {TSDataType.DOUBLE, TSDataType.BOOLEAN},
+              2000L,
+              new Object[] {2.0, false},
+              false,
+              new TsTableColumnCategory[] {
+                TsTableColumnCategory.ID,
+                TsTableColumnCategory.ATTRIBUTE,
+                TsTableColumnCategory.MEASUREMENT
+              }),
+          1);
 
-    ByteBuffer byteBuffer = ByteBuffer.allocate(10000);
-    node.serialize(byteBuffer);
-    byteBuffer.flip();
+      ByteBuffer byteBuffer = ByteBuffer.allocate(10000);
+      node.serialize(byteBuffer);
+      byteBuffer.flip();
 
-    Assert.assertEquals(PlanNodeType.RELATIONAL_INSERT_ROWS.getNodeType(), byteBuffer.getShort());
+      Assert.assertEquals(PlanNodeType.RELATIONAL_INSERT_ROWS.getNodeType(), byteBuffer.getShort());
 
-    Assert.assertEquals(node, RelationalInsertRowsNode.deserialize(byteBuffer));
+      Assert.assertEquals(node, RelationalInsertRowsNode.deserialize(byteBuffer));
+    }
   }
 
   @Test
-  public void testSerializeAndDeserializeForWALRelational()
-      throws IllegalPathException, IOException {
-    RelationalInsertRowsNode insertRowsNode =
-        new RelationalInsertRowsNode(new PlanNodeId("plan node 1"));
-    insertRowsNode.addOneInsertRowNode(
-        new RelationalInsertRowNode(
-            new PlanNodeId(""),
-            new PartialPath("root.sg.d1"),
-            false,
-            new String[] {"s1", "s2", "s3", "s4", "s5"},
-            new TSDataType[] {
-              TSDataType.DOUBLE,
-              TSDataType.FLOAT,
-              TSDataType.INT64,
-              TSDataType.TEXT,
-              TSDataType.STRING
-            },
-            new MeasurementSchema[] {
-              new MeasurementSchema("s1", TSDataType.DOUBLE),
-              new MeasurementSchema("s2", TSDataType.FLOAT),
-              new MeasurementSchema("s3", TSDataType.INT64),
-              new MeasurementSchema("s4", TSDataType.TEXT),
-              new MeasurementSchema("s5", TSDataType.STRING)
-            },
-            1000L,
-            new Object[] {1.0, 2f, 300L, new Binary("444".getBytes(StandardCharsets.UTF_8)), null},
-            false,
-            new TsTableColumnCategory[] {
-              TsTableColumnCategory.ID,
-              TsTableColumnCategory.ATTRIBUTE,
-              TsTableColumnCategory.MEASUREMENT,
-              TsTableColumnCategory.MEASUREMENT,
-              TsTableColumnCategory.MEASUREMENT
-            }),
-        0);
+  public void testSerializeAndDeserializeForWALRelational() throws IOException {
+    for (String tableName : new String[] {"table1", "ta`ble1", "root.table1"}) {
+      RelationalInsertRowsNode insertRowsNode =
+          new RelationalInsertRowsNode(new PlanNodeId("plan node 1"));
+      insertRowsNode.addOneInsertRowNode(
+          new RelationalInsertRowNode(
+              new PlanNodeId(""),
+              new PartialPath(tableName, false),
+              false,
+              new String[] {"s1", "s2", "s3", "s4", "s5"},
+              new TSDataType[] {
+                TSDataType.DOUBLE,
+                TSDataType.FLOAT,
+                TSDataType.INT64,
+                TSDataType.TEXT,
+                TSDataType.STRING
+              },
+              new MeasurementSchema[] {
+                new MeasurementSchema("s1", TSDataType.DOUBLE),
+                new MeasurementSchema("s2", TSDataType.FLOAT),
+                new MeasurementSchema("s3", TSDataType.INT64),
+                new MeasurementSchema("s4", TSDataType.TEXT),
+                new MeasurementSchema("s5", TSDataType.STRING)
+              },
+              1000L,
+              new Object[] {
+                1.0, 2f, 300L, new Binary("444".getBytes(StandardCharsets.UTF_8)), null
+              },
+              false,
+              new TsTableColumnCategory[] {
+                TsTableColumnCategory.ID,
+                TsTableColumnCategory.ATTRIBUTE,
+                TsTableColumnCategory.MEASUREMENT,
+                TsTableColumnCategory.MEASUREMENT,
+                TsTableColumnCategory.MEASUREMENT
+              }),
+          0);
 
-    insertRowsNode.addOneInsertRowNode(
-        new RelationalInsertRowNode(
-            new PlanNodeId(""),
-            new PartialPath("root.sg.d2"),
-            false,
-            new String[] {"s1", "s4"},
-            new TSDataType[] {TSDataType.DOUBLE, TSDataType.BOOLEAN},
-            new MeasurementSchema[] {
-              new MeasurementSchema("s1", TSDataType.DOUBLE),
-              new MeasurementSchema("s4", TSDataType.BOOLEAN),
-            },
-            2000L,
-            new Object[] {2.0, false},
-            false,
-            new TsTableColumnCategory[] {
-              TsTableColumnCategory.ID, TsTableColumnCategory.ATTRIBUTE
-            }),
-        1);
+      insertRowsNode.addOneInsertRowNode(
+          new RelationalInsertRowNode(
+              new PlanNodeId(""),
+              new PartialPath(tableName, false),
+              false,
+              new String[] {"s1", "s4"},
+              new TSDataType[] {TSDataType.DOUBLE, TSDataType.BOOLEAN},
+              new MeasurementSchema[] {
+                new MeasurementSchema("s1", TSDataType.DOUBLE),
+                new MeasurementSchema("s4", TSDataType.BOOLEAN),
+              },
+              2000L,
+              new Object[] {2.0, false},
+              false,
+              new TsTableColumnCategory[] {
+                TsTableColumnCategory.ID, TsTableColumnCategory.ATTRIBUTE
+              }),
+          1);
 
-    int serializedSize = insertRowsNode.serializedSize();
+      int serializedSize = insertRowsNode.serializedSize();
 
-    byte[] bytes = new byte[serializedSize];
-    WALByteBufferForTest walBuffer = new WALByteBufferForTest(ByteBuffer.wrap(bytes));
+      byte[] bytes = new byte[serializedSize];
+      WALByteBufferForTest walBuffer = new WALByteBufferForTest(ByteBuffer.wrap(bytes));
 
-    insertRowsNode.serializeToWAL(walBuffer);
-    Assert.assertFalse(walBuffer.getBuffer().hasRemaining());
+      insertRowsNode.serializeToWAL(walBuffer);
+      Assert.assertFalse(walBuffer.getBuffer().hasRemaining());
 
-    DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bytes));
+      DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bytes));
 
-    Assert.assertEquals(
-        PlanNodeType.RELATIONAL_INSERT_ROWS.getNodeType(), dataInputStream.readShort());
+      Assert.assertEquals(
+          PlanNodeType.RELATIONAL_INSERT_ROWS.getNodeType(), dataInputStream.readShort());
 
-    RelationalInsertRowsNode tmpNode = RelationalInsertRowsNode.deserializeFromWAL(dataInputStream);
-    tmpNode.setPlanNodeId(insertRowsNode.getPlanNodeId());
-    Assert.assertEquals(insertRowsNode, tmpNode);
+      RelationalInsertRowsNode tmpNode =
+          RelationalInsertRowsNode.deserializeFromWAL(dataInputStream);
+      tmpNode.setPlanNodeId(insertRowsNode.getPlanNodeId());
+      Assert.assertEquals(insertRowsNode, tmpNode);
+    }
   }
 }
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsOfOneDeviceNodeSerdeTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsOfOneDeviceNodeSerdeTest.java
index d992090ba08..692d96e9506 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsOfOneDeviceNodeSerdeTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertRowsOfOneDeviceNodeSerdeTest.java
@@ -40,7 +40,7 @@ public class InsertRowsOfOneDeviceNodeSerdeTest {
   public void TestSerializeAndDeserialize() throws IllegalPathException {
     PartialPath device = new PartialPath("root.sg.d");
     InsertRowsOfOneDeviceNode node = new InsertRowsOfOneDeviceNode(new PlanNodeId("plan node 1"));
-    node.setDevicePath(device);
+    node.setTargetPath(device);
     List<InsertRowNode> insertRowNodeList = new ArrayList<>();
     List<Integer> insertRowNodeIndexList = new ArrayList<>();
     insertRowNodeList.add(
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertTabletNodeSerdeTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertTabletNodeSerdeTest.java
index 013aad45b95..69587fbd9d7 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertTabletNodeSerdeTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/InsertTabletNodeSerdeTest.java
@@ -97,57 +97,63 @@ public class InsertTabletNodeSerdeTest {
 
   @Test
   public void testSerializeAndDeserializeRelational() throws IllegalPathException {
-    RelationalInsertTabletNode insertTabletNode = getRelationalInsertTabletNode();
+    for (String tableName : new String[] {"table1", "ta`ble1", "root.table1"}) {
+      RelationalInsertTabletNode insertTabletNode = getRelationalInsertTabletNode(tableName);
 
-    ByteBuffer byteBuffer = ByteBuffer.allocate(10000);
-    insertTabletNode.serialize(byteBuffer);
-    byteBuffer.flip();
+      ByteBuffer byteBuffer = ByteBuffer.allocate(10000);
+      insertTabletNode.serialize(byteBuffer);
+      byteBuffer.flip();
 
-    Assert.assertEquals(PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), byteBuffer.getShort());
+      Assert.assertEquals(
+          PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), byteBuffer.getShort());
 
-    Assert.assertEquals(insertTabletNode, RelationalInsertTabletNode.deserialize(byteBuffer));
+      Assert.assertEquals(insertTabletNode, RelationalInsertTabletNode.deserialize(byteBuffer));
 
-    insertTabletNode = getRelationalInsertTabletNodeWithSchema();
-    byteBuffer = ByteBuffer.allocate(10000);
-    insertTabletNode.serialize(byteBuffer);
-    byteBuffer.flip();
+      insertTabletNode = getRelationalInsertTabletNodeWithSchema(tableName);
+      byteBuffer = ByteBuffer.allocate(10000);
+      insertTabletNode.serialize(byteBuffer);
+      byteBuffer.flip();
 
-    Assert.assertEquals(PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), byteBuffer.getShort());
+      Assert.assertEquals(
+          PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), byteBuffer.getShort());
 
-    Assert.assertEquals(insertTabletNode, RelationalInsertTabletNode.deserialize(byteBuffer));
+      Assert.assertEquals(insertTabletNode, RelationalInsertTabletNode.deserialize(byteBuffer));
+    }
   }
 
   @Test
-  public void testSerializeAndDeserializeForWALRelational()
-      throws IllegalPathException, IOException {
-    RelationalInsertTabletNode insertTabletNode = getRelationalInsertTabletNodeWithSchema();
+  public void testSerializeAndDeserializeForWALRelational() throws IOException {
+    for (String tableName : new String[] {"table1", "ta`ble1", "root.table1"}) {
+      RelationalInsertTabletNode insertTabletNode =
+          getRelationalInsertTabletNodeWithSchema(tableName);
 
-    int serializedSize = insertTabletNode.serializedSize();
+      int serializedSize = insertTabletNode.serializedSize();
 
-    byte[] bytes = new byte[serializedSize];
-    WALByteBufferForTest walBuffer = new WALByteBufferForTest(ByteBuffer.wrap(bytes));
+      byte[] bytes = new byte[serializedSize];
+      WALByteBufferForTest walBuffer = new WALByteBufferForTest(ByteBuffer.wrap(bytes));
 
-    insertTabletNode.serializeToWAL(walBuffer);
-    Assert.assertFalse(walBuffer.getBuffer().hasRemaining());
+      insertTabletNode.serializeToWAL(walBuffer);
+      Assert.assertFalse(walBuffer.getBuffer().hasRemaining());
 
-    DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bytes));
+      DataInputStream dataInputStream = new DataInputStream(new ByteArrayInputStream(bytes));
 
-    Assert.assertEquals(
-        PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), dataInputStream.readShort());
+      Assert.assertEquals(
+          PlanNodeType.RELATIONAL_INSERT_TABLET.getNodeType(), dataInputStream.readShort());
 
-    RelationalInsertTabletNode tmpNode =
-        RelationalInsertTabletNode.deserializeFromWAL(dataInputStream);
-    tmpNode.setPlanNodeId(insertTabletNode.getPlanNodeId());
+      RelationalInsertTabletNode tmpNode =
+          RelationalInsertTabletNode.deserializeFromWAL(dataInputStream);
+      tmpNode.setPlanNodeId(insertTabletNode.getPlanNodeId());
 
-    tmpNode.setMeasurementSchemas(
-        new MeasurementSchema[] {
-          new MeasurementSchema("s1", TSDataType.DOUBLE),
-          new MeasurementSchema("s2", TSDataType.FLOAT),
-          new MeasurementSchema("s3", TSDataType.INT64),
-          new MeasurementSchema("s4", TSDataType.INT32),
-          new MeasurementSchema("s5", TSDataType.BOOLEAN)
-        });
-    Assert.assertEquals(insertTabletNode, tmpNode);
+      tmpNode.setMeasurementSchemas(
+          new MeasurementSchema[] {
+            new MeasurementSchema("s1", TSDataType.DOUBLE),
+            new MeasurementSchema("s2", TSDataType.FLOAT),
+            new MeasurementSchema("s3", TSDataType.INT64),
+            new MeasurementSchema("s4", TSDataType.INT32),
+            new MeasurementSchema("s5", TSDataType.BOOLEAN)
+          });
+      Assert.assertEquals(insertTabletNode, tmpNode);
+    }
   }
 
   @Test
@@ -268,7 +274,8 @@ public class InsertTabletNodeSerdeTest {
     return insertTabletNode;
   }
 
-  private RelationalInsertTabletNode getRelationalInsertTabletNode() throws IllegalPathException {
+  private RelationalInsertTabletNode getRelationalInsertTabletNode(String tableName)
+      throws IllegalPathException {
     long[] times = new long[] {110L, 111L, 112L, 113L};
     TSDataType[] dataTypes = new TSDataType[5];
     dataTypes[0] = TSDataType.DOUBLE;
@@ -295,7 +302,7 @@ public class InsertTabletNodeSerdeTest {
     RelationalInsertTabletNode tabletNode =
         new RelationalInsertTabletNode(
             new PlanNodeId("plannode 1"),
-            new PartialPath("root.isp.d1"),
+            new PartialPath(tableName, false),
             false,
             new String[] {"s1", "s2", "s3", "s4", "s5"},
             dataTypes,
@@ -314,8 +321,7 @@ public class InsertTabletNodeSerdeTest {
     return tabletNode;
   }
 
-  private RelationalInsertTabletNode getRelationalInsertTabletNodeWithSchema()
-      throws IllegalPathException {
+  private RelationalInsertTabletNode getRelationalInsertTabletNodeWithSchema(String tableName) {
     long[] times = new long[] {110L, 111L, 112L, 113L};
     TSDataType[] dataTypes = new TSDataType[5];
     dataTypes[0] = TSDataType.DOUBLE;
@@ -342,7 +348,7 @@ public class InsertTabletNodeSerdeTest {
     RelationalInsertTabletNode insertTabletNode =
         new RelationalInsertTabletNode(
             new PlanNodeId("plannode 1"),
-            new PartialPath("root.isp.d1"),
+            new PartialPath(tableName, false),
             false,
             new String[] {"s1", "s2", "s3", "s4", "s5"},
             dataTypes,
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/WritePlanNodeSplitTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/WritePlanNodeSplitTest.java
index 9a83eed47d1..c3ca365befb 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/WritePlanNodeSplitTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/queryengine/plan/planner/node/write/WritePlanNodeSplitTest.java
@@ -194,7 +194,7 @@ public class WritePlanNodeSplitTest {
   public void testSplitInsertTablet() throws IllegalPathException {
     InsertTabletNode insertTabletNode = new InsertTabletNode(new PlanNodeId("plan node 1"));
 
-    insertTabletNode.setDevicePath(new PartialPath("root.sg1.d1"));
+    insertTabletNode.setTargetPath(new PartialPath("root.sg1.d1"));
     insertTabletNode.setTimes(
         new long[] {-200, -101, 1, 60, 120, 180, 270, 290, 360, 375, 440, 470});
     insertTabletNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
@@ -203,7 +203,7 @@ public class WritePlanNodeSplitTest {
 
     DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
     dataPartitionQueryParam.setDeviceID(
-        insertTabletNode.getDevicePath().getIDeviceIDAsFullDevice());
+        insertTabletNode.getTargetPath().getIDeviceIDAsFullDevice());
     dataPartitionQueryParam.setTimePartitionSlotList(insertTabletNode.getTimePartitionSlots());
 
     DataPartition dataPartition =
@@ -223,14 +223,14 @@ public class WritePlanNodeSplitTest {
 
     insertTabletNode = new InsertTabletNode(new PlanNodeId("plan node 2"));
 
-    insertTabletNode.setDevicePath(new PartialPath("root.sg2.d1"));
+    insertTabletNode.setTargetPath(new PartialPath("root.sg2.d1"));
     insertTabletNode.setTimes(new long[] {1, 60, 120, 180, 270, 290, 360, 375, 440, 470});
     insertTabletNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
     insertTabletNode.setColumns(new Object[] {new int[] {10, 20, 30, 40, 50, 60, 70, 80, 90, 100}});
 
     dataPartitionQueryParam = new DataPartitionQueryParam();
     dataPartitionQueryParam.setDeviceID(
-        insertTabletNode.getDevicePath().getIDeviceIDAsFullDevice());
+        insertTabletNode.getTargetPath().getIDeviceIDAsFullDevice());
     dataPartitionQueryParam.setTimePartitionSlotList(insertTabletNode.getTimePartitionSlots());
 
     dataPartition = getDataPartition(Collections.singletonList(dataPartitionQueryParam));
@@ -252,7 +252,7 @@ public class WritePlanNodeSplitTest {
 
     for (int i = 0; i < 5; i++) {
       InsertTabletNode insertTabletNode = new InsertTabletNode(new PlanNodeId("plan node 3"));
-      insertTabletNode.setDevicePath(new PartialPath(String.format("root.sg1.d%d", i)));
+      insertTabletNode.setTargetPath(new PartialPath(String.format("root.sg1.d%d", i)));
       insertTabletNode.setTimes(new long[] {1, 60, 120, 180, 270, 290, 360, 375, 440, 470});
       insertTabletNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
       insertTabletNode.setColumns(
@@ -260,7 +260,7 @@ public class WritePlanNodeSplitTest {
       insertMultiTabletsNode.addInsertTabletNode(insertTabletNode, 2 * i);
 
       insertTabletNode = new InsertTabletNode(new PlanNodeId("plan node 3"));
-      insertTabletNode.setDevicePath(new PartialPath(String.format("root.sg2.d%d", i)));
+      insertTabletNode.setTargetPath(new PartialPath(String.format("root.sg2.d%d", i)));
       insertTabletNode.setTimes(new long[] {1, 60, 120, 180, 270, 290, 360, 375, 440, 470});
       insertTabletNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
       insertTabletNode.setColumns(
@@ -272,7 +272,7 @@ public class WritePlanNodeSplitTest {
     for (InsertTabletNode insertTabletNode : insertMultiTabletsNode.getInsertTabletNodeList()) {
       DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
       dataPartitionQueryParam.setDeviceID(
-          insertTabletNode.getDevicePath().getIDeviceIDAsFullDevice());
+          insertTabletNode.getTargetPath().getIDeviceIDAsFullDevice());
       dataPartitionQueryParam.setTimePartitionSlotList(insertTabletNode.getTimePartitionSlots());
       dataPartitionQueryParams.add(dataPartitionQueryParam);
     }
@@ -293,12 +293,12 @@ public class WritePlanNodeSplitTest {
 
     for (int i = 0; i < 7; i++) {
       InsertRowNode insertRowNode = new InsertRowNode(new PlanNodeId("plan node 3"));
-      insertRowNode.setDevicePath(new PartialPath(String.format("root.sg1.d%d", i)));
+      insertRowNode.setTargetPath(new PartialPath(String.format("root.sg1.d%d", i)));
       insertRowNode.setTime((i - 2) * TimePartitionUtils.getTimePartitionInterval());
       insertRowsNode.addOneInsertRowNode(insertRowNode, 2 * i);
 
       insertRowNode = new InsertRowNode(new PlanNodeId("plan node 3"));
-      insertRowNode.setDevicePath(new PartialPath(String.format("root.sg2.d%d", i)));
+      insertRowNode.setTargetPath(new PartialPath(String.format("root.sg2.d%d", i)));
       insertRowNode.setTime(1);
       insertRowsNode.addOneInsertRowNode(insertRowNode, 2 * i + 1);
     }
@@ -306,7 +306,7 @@ public class WritePlanNodeSplitTest {
     List<DataPartitionQueryParam> dataPartitionQueryParams = new ArrayList<>();
     for (InsertRowNode insertRowNode : insertRowsNode.getInsertRowNodeList()) {
       DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
-      dataPartitionQueryParam.setDeviceID(insertRowNode.getDevicePath().getIDeviceIDAsFullDevice());
+      dataPartitionQueryParam.setDeviceID(insertRowNode.getTargetPath().getIDeviceIDAsFullDevice());
       dataPartitionQueryParam.setTimePartitionSlotList(insertRowNode.getTimePartitionSlots());
       dataPartitionQueryParams.add(dataPartitionQueryParam);
     }
@@ -332,7 +332,7 @@ public class WritePlanNodeSplitTest {
     long[] times = new long[] {1, 60, 120, 180, 270, 290, 360, 375, 440, 470};
     for (int i = 0; i < 10; i++) {
       InsertRowNode insertRowNode = new InsertRowNode(new PlanNodeId("plan node 4"));
-      insertRowNode.setDevicePath(new PartialPath("root.sg1.d1"));
+      insertRowNode.setTargetPath(new PartialPath("root.sg1.d1"));
       insertRowNode.setMeasurements(new String[] {"s1"});
       insertRowNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
       insertRowNode.setTime(times[i]);
@@ -345,7 +345,7 @@ public class WritePlanNodeSplitTest {
     List<DataPartitionQueryParam> dataPartitionQueryParams = new ArrayList<>();
     for (InsertRowNode insertRowNode : insertRowsOfOneDeviceNode.getInsertRowNodeList()) {
       DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
-      dataPartitionQueryParam.setDeviceID(insertRowNode.getDevicePath().getIDeviceIDAsFullDevice());
+      dataPartitionQueryParam.setDeviceID(insertRowNode.getTargetPath().getIDeviceIDAsFullDevice());
       dataPartitionQueryParam.setTimePartitionSlotList(insertRowNode.getTimePartitionSlots());
       dataPartitionQueryParams.add(dataPartitionQueryParam);
     }
@@ -369,7 +369,7 @@ public class WritePlanNodeSplitTest {
     insertRowNodeIndexList = new ArrayList<>();
     for (int i = 0; i < 10; i++) {
       InsertRowNode insertRowNode = new InsertRowNode(new PlanNodeId("plan node 5"));
-      insertRowNode.setDevicePath(new PartialPath("root.sg2.d1"));
+      insertRowNode.setTargetPath(new PartialPath("root.sg2.d1"));
       insertRowNode.setMeasurements(new String[] {"s1"});
       insertRowNode.setDataTypes(new TSDataType[] {TSDataType.INT32});
       insertRowNode.setTime(times[i]);
@@ -382,7 +382,7 @@ public class WritePlanNodeSplitTest {
     dataPartitionQueryParams = new ArrayList<>();
     for (InsertRowNode insertRowNode : insertRowsOfOneDeviceNode.getInsertRowNodeList()) {
       DataPartitionQueryParam dataPartitionQueryParam = new DataPartitionQueryParam();
-      dataPartitionQueryParam.setDeviceID(insertRowNode.getDevicePath().getIDeviceIDAsFullDevice());
+      dataPartitionQueryParam.setDeviceID(insertRowNode.getTargetPath().getIDeviceIDAsFullDevice());
       dataPartitionQueryParam.setTimePartitionSlotList(insertRowNode.getTimePartitionSlots());
       dataPartitionQueryParams.add(dataPartitionQueryParam);
     }
diff --git a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/ConsensusReqReaderTest.java b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/ConsensusReqReaderTest.java
index 3f3a4ff7987..ca102ef8cf5 100644
--- a/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/ConsensusReqReaderTest.java
+++ b/iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/wal/node/ConsensusReqReaderTest.java
@@ -114,7 +114,7 @@ public class ConsensusReqReaderTest {
     walNode.log(0, insertRowNode); // 3
     walNode.rollWALFile();
     // _3-3-1.wal
-    insertRowNode.setDevicePath(new PartialPath(devicePath + "test"));
+    insertRowNode.setTargetPath(new PartialPath(devicePath + "test"));
     walNode.log(0, insertRowNode); // 3
     insertTabletNode = getInsertTabletNode(devicePath, new long[] {4});
     insertTabletNode.setSearchIndex(4);