[branch-2.1](iot) Fix unexpected error when iot auto detect get no data (#40657) (#40691)

pick https://github.com/apache/doris/pull/40657
This commit is contained in:
zclllhhjj
2024-09-12 14:03:43 +08:00
committed by GitHub
parent 3604d63184
commit e2dc7544dd
3 changed files with 32 additions and 19 deletions

View File

@ -79,6 +79,9 @@ public class InsertOverwriteUtil {
ReplacePartitionClause replacePartitionClause = new ReplacePartitionClause(
new PartitionNames(false, partitionNames),
new PartitionNames(true, tempPartitionNames), properties);
if (replacePartitionClause.getTempPartitionNames().isEmpty()) {
return;
}
Env.getCurrentEnv()
.replaceTempPartition((Database) olapTable.getDatabase(),
(OlapTable) olapTable, replacePartitionClause);