DanielWang2035 commented on code in PR #13706:
URL: https://github.com/apache/iotdb/pull/13706#discussion_r1799575694


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/load/LoadTsFileNode.java:
##########
@@ -90,25 +96,54 @@ protected void serializeAttributes(DataOutputStream stream) 
throws IOException {
 
   @Override
   public List<WritePlanNode> splitByPartition(IAnalysis analysis) {
+    if (analysis instanceof Analysis) {
+      return splitByPartitionForTreeModel((Analysis) analysis);
+    } else {
+      return splitByPartitionForTableModel(
+          (org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis) 
analysis);
+    }
+  }
+
+  private List<WritePlanNode> splitByPartitionForTreeModel(Analysis analysis) {
     List<WritePlanNode> res = new ArrayList<>();
     LoadTsFileStatement statement =
-        ((Analysis) analysis).getTreeStatement() instanceof 
PipeEnrichedStatement
+        analysis.getTreeStatement() instanceof PipeEnrichedStatement
             ? (LoadTsFileStatement)
-                ((PipeEnrichedStatement) ((Analysis) 
analysis).getTreeStatement())
-                    .getInnerStatement()
-            : (LoadTsFileStatement) ((Analysis) analysis).getTreeStatement();
+                ((PipeEnrichedStatement) 
analysis.getTreeStatement()).getInnerStatement()
+            : (LoadTsFileStatement) analysis.getTreeStatement();
 
     for (int i = 0; i < resources.size(); i++) {
       res.add(
           new LoadSingleTsFileNode(
               getPlanNodeId(),
               resources.get(i),
+              isTableModel.get(i),
+              database,
               statement.isDeleteAfterLoad(),
               statement.getWritePointCount(i)));
     }
     return res;
   }
 
+  private List<WritePlanNode> splitByPartitionForTableModel(
+      org.apache.iotdb.db.queryengine.plan.relational.analyzer.Analysis 
analysis) {
+    List<WritePlanNode> res = new ArrayList<>();
+    LoadTsFile statement = (LoadTsFile) analysis.getStatement();

Review Comment:
   TODO: consider PipeEnriched



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to