morningman commented on code in PR #23682: URL: https://github.com/apache/doris/pull/23682#discussion_r1316100986
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/InsertIntoTableCommand.java: ########## @@ -151,6 +179,153 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { } } + /** + * when `isOverwrite` is true, use this logic + * + * @param ctx ctx + * @param executor executor + * @param physicalOlapTableSink physicalOlapTableSink + * @throws Exception Exception + */ + public void dealOverwrite(ConnectContext ctx, StmtExecutor executor, PhysicalOlapTableSink<?> physicalOlapTableSink) + throws Exception { + OlapTable targetTable = physicalOlapTableSink.getTargetTable(); + TableName tableName = new TableName(InternalCatalog.INTERNAL_CATALOG_NAME, targetTable.getQualifiedDbName(), + targetTable.getName()); + List partitionNames = ((UnboundOlapTableSink) logicalQuery).getPartitions(); + if (CollectionUtils.isEmpty(partitionNames)) { + partitionNames = Lists.newArrayList(targetTable.getPartitionNames()); + } + List<String> tempPartitionNames = addTempPartition(ctx, tableName, partitionNames); Review Comment: We should not contain any Class of old planner here, such as `TableName`, `ReplacePartitionClause`, etc. But we need to write a lot more code to implement them in new planner. So I suggest to add TODO here, and implement it later -- 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