Decide what to do with router planner error at one place (#6781)

pull/6754/head^2
Onur Tirtir 2023-03-21 14:04:07 +03:00 committed by GitHub
parent aa33988c6e
commit aa465b6de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 24 deletions

View File

@ -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
{
@ -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)