Skip to content

Commit

Permalink
Merge branch 'main' into arbitrary-conf-router-test
Browse files Browse the repository at this point in the history
  • Loading branch information
onurctirtir authored Mar 21, 2023
2 parents edba5d9 + aa465b6 commit 3067a76
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions src/backend/distributed/planner/distributed_planner.c
Original file line number Diff line number Diff line change
Expand Up @@ -944,18 +944,6 @@ CreateDistributedPlan(uint64 planId, bool allowRecursivePlanning, Query *origina
distributedPlan =
CreateModifyPlan(originalQuery, query, plannerRestrictionContext);
}

/* the functions above always return a plan, possibly with an error */
Assert(distributedPlan);

if (distributedPlan->planningError == NULL)
{
return distributedPlan;
}
else
{
RaiseDeferredError(distributedPlan->planningError, DEBUG2);
}
}
else
{
Expand All @@ -968,18 +956,18 @@ CreateDistributedPlan(uint64 planId, bool allowRecursivePlanning, Query *origina

distributedPlan = CreateRouterPlan(originalQuery, query,
plannerRestrictionContext);
if (distributedPlan->planningError == NULL)
{
return distributedPlan;
}
else
{
/*
* For debugging it's useful to display why query was not
* router plannable.
*/
RaiseDeferredError(distributedPlan->planningError, DEBUG2);
}
}

/* the functions above always return a plan, possibly with an error */
Assert(distributedPlan);

if (distributedPlan->planningError == NULL)
{
return distributedPlan;
}
else
{
RaiseDeferredError(distributedPlan->planningError, DEBUG2);
}

if (hasUnresolvedParams)
Expand Down

0 comments on commit 3067a76

Please sign in to comment.