JNSimba commented on code in PR #56175:
URL: https://github.com/apache/doris/pull/56175#discussion_r2370830055


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateJobInfo.java:
##########
@@ -234,6 +262,32 @@ private AbstractJob analyzeAndCreateJob(String sql, String 
currentDbName,
         }
     }
 
+    private AbstractJob analyzeAndCreateStreamingInsertJob(String sql, String 
currentDbName,
+            JobExecutionConfiguration jobExecutionConfiguration, Map<String, 
String> properties) throws UserException {
+        NereidsParser parser = new NereidsParser();
+        LogicalPlan logicalPlan = parser.parseSingle(sql);
+        if (logicalPlan instanceof InsertIntoTableCommand) {
+            InsertIntoTableCommand insertIntoTableCommand = 
(InsertIntoTableCommand) logicalPlan;
+            try {
+                insertIntoTableCommand.initPlan(ConnectContext.get(), 
ConnectContext.get().getExecutor(), false);
+                return new StreamingInsertJob(labelNameOptional.get(),
+                        JobStatus.PENDING,
+                        currentDbName,
+                        comment,
+                        ConnectContext.get().getCurrentUserIdentity(),
+                        jobExecutionConfiguration,
+                        System.currentTimeMillis(),
+                        sql,
+                        properties);
+            } catch (Exception e) {
+                throw new AnalysisException(e.getMessage());
+            }
+        } else {
+            throw new AnalysisException("Not support this sql : " + sql + " 
Command class is "
+                    + logicalPlan.getClass().getName() + ".");

Review Comment:
   already update



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java:
##########
@@ -536,6 +544,26 @@ public List<String> getTargetColumns() {
         }
     }
 
+    // todo: add ut
+    public List<UnboundTVFRelation> getAllTVFRelation() {
+        List<UnboundTVFRelation> tvfs = new ArrayList<>();
+        findAllTVFInPlan(getLogicalQuery(), tvfs);
+        return tvfs;

Review Comment:
   already update



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to