[Fix](Planner) fix delete from using does not attach partition information (#39020) (#39418)

cherry-pick from master #39020
Problem:
when use delete from using clause and assign partition information, it
would delete more data from other partition
Solved:
add partition information when transfer delete clause into insert into
select clause
This commit is contained in:
LiBinfeng
2024-08-16 17:16:08 +08:00
committed by GitHub
parent e249e00586
commit 4458302a77
3 changed files with 39 additions and 0 deletions

View File

@ -169,6 +169,7 @@ public class DeleteStmt extends DdlStmt {
}
FromClause fromUsedInInsert;
targetTableRef.setPartitionNames(partitionNames);
if (fromClause == null) {
fromUsedInInsert = new FromClause(Lists.newArrayList(targetTableRef));
} else {