morrySnow commented on code in PR #25049: URL: https://github.com/apache/doris/pull/25049#discussion_r1352275870
########## fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java: ########## @@ -2736,6 +2738,77 @@ private List<ResultRow> convertResultBatchToResultRows(TResultBatch batch) { return resultRows; } + public void generateStreamLoadNereidsPlan(TUniqueId queryId) throws Exception { Review Comment: private ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/InsertIntoTableCommand.java: ########## @@ -166,7 +169,18 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { state.addTableIndexes(physicalOlapTableSink.getTargetTable()); executor.setProfileType(ProfileType.LOAD); - + if (ctx.getTxnEntry() == null) { + TransactionEntry transactionEntry = new TransactionEntry(new TTxnParams().setTxnId(txn.getTxnId()), + physicalOlapTableSink.getDatabase(), physicalOlapTableSink.getTargetTable()); + transactionEntry.setLabel(label); + ctx.setTxnEntry(transactionEntry); + } + executor.setPlanner(planner); + TVFScanNode planRoot = (TVFScanNode) planner.getFragments().get(0).getPlanRoot(); + if ("HttpStreamTableValuedFunction".equals(planRoot.getTvfName())) { + LOG.info("exec http_stream by nereids, query id: {}, txn id: {}", ctx.queryId(), txn.getTxnId()); + return; + } Review Comment: cannot understand this code block, please explain it ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/InsertIntoTableCommand.java: ########## @@ -136,15 +145,15 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { if (isOverwrite) { dealOverwrite(ctx, executor, physicalOlapTableSink); - return; + return null; Review Comment: so stream load could not do insert overwrite? ########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/InsertIntoTableCommand.java: ########## @@ -166,7 +175,13 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { state.addTableIndexes(physicalOlapTableSink.getTargetTable()); executor.setProfileType(ProfileType.LOAD); + executor.setPlanner(planner); Review Comment: why set planner here? ########## fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java: ########## @@ -2736,6 +2738,77 @@ private List<ResultRow> convertResultBatchToResultRows(TResultBatch batch) { return resultRows; } + public void generateStreamLoadNereidsPlan(TUniqueId queryId) throws Exception { + LOG.info("TUniqueId: {} generate stream load plan", queryId); Review Comment: debug? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org