zhiqiang-hhhh commented on code in PR #47296: URL: https://github.com/apache/doris/pull/47296#discussion_r1925440993
########## fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java: ########## @@ -1226,6 +1231,40 @@ private boolean isQuery() { && !(((LogicalPlanAdapter) parsedStmt).getLogicalPlan() instanceof Command)); } + private boolean isProfileSafeStmt() { + // fe/fe-core/src/main/java/org/apache/doris/nereids/NereidsPlanner.java:131 + // Only generate profile for NereidsPlanner. + if (!(parsedStmt instanceof LogicalPlanAdapter)) { + return false; + } + + LogicalPlan plan = ((LogicalPlanAdapter) parsedStmt).getLogicalPlan(); + + if (plan instanceof InsertIntoTableCommand) { + LogicalPlan logicalPlan = ((InsertIntoTableCommand) plan).getLogicalQuery(); + if ((logicalPlan instanceof UnboundTableSink) || (logicalPlan instanceof UnboundBaseExternalTableSink)) { + if (logicalPlan.children() == null || logicalPlan.children().isEmpty()) { + return false; + } + + for (Plan child : logicalPlan.children()) { + if (child instanceof InlineTable) { + return false; + } + } + } Review Comment: done -- 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