[fix](partial update) Fix NPE when the query statement of an update statement is a point query in OriginPlanner (#26881)
close #26882 We should not use the singleNodePlan to generate the rootPlanFragment if the query is inside a insert statement or distributedPlanner will be null. introduced in #15491
This commit is contained in:
@ -211,7 +211,7 @@ public class OriginalPlanner extends Planner {
|
||||
}
|
||||
checkAndSetTopnOpt(singleNodePlan);
|
||||
|
||||
if (queryOptions.num_nodes == 1 || queryStmt.isPointQuery()) {
|
||||
if ((queryOptions.num_nodes == 1 || queryStmt.isPointQuery()) && !(statement instanceof InsertStmt)) {
|
||||
// single-node execution; we're almost done
|
||||
singleNodePlan = addUnassignedConjuncts(analyzer, singleNodePlan);
|
||||
fragments.add(new PlanFragment(plannerContext.getNextFragmentId(), singleNodePlan,
|
||||
|
||||
Reference in New Issue
Block a user