[fix](planner) throw NPE when insert overwrite partition(*) (#40656) (#40903)

pick from master #40656
This commit is contained in:
morrySnow
2024-09-18 13:48:48 +08:00
committed by GitHub
parent 3336e6acbb
commit 7d23a7c587

View File

@ -75,7 +75,9 @@ public class InsertOverwriteTableStmt extends DdlStmt {
}
public List<String> getPartitionNames() {
if (target.getPartitionNames() == null) {
if (target.getPartitionNames() == null
|| target.getPartitionNames().getPartitionNames() == null
|| target.getPartitionNames().isStar()) {
return new ArrayList<>();
}
return target.getPartitionNames().getPartitionNames();