mirror of https://github.com/citusdata/citus.git
Decide what to do with router planner error at one place (#6781)
parent
aa33988c6e
commit
aa465b6de1
|
@ -944,18 +944,6 @@ CreateDistributedPlan(uint64 planId, bool allowRecursivePlanning, Query *origina
|
||||||
distributedPlan =
|
distributedPlan =
|
||||||
CreateModifyPlan(originalQuery, query, plannerRestrictionContext);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -968,19 +956,19 @@ CreateDistributedPlan(uint64 planId, bool allowRecursivePlanning, Query *origina
|
||||||
|
|
||||||
distributedPlan = CreateRouterPlan(originalQuery, query,
|
distributedPlan = CreateRouterPlan(originalQuery, query,
|
||||||
plannerRestrictionContext);
|
plannerRestrictionContext);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the functions above always return a plan, possibly with an error */
|
||||||
|
Assert(distributedPlan);
|
||||||
|
|
||||||
if (distributedPlan->planningError == NULL)
|
if (distributedPlan->planningError == NULL)
|
||||||
{
|
{
|
||||||
return distributedPlan;
|
return distributedPlan;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* For debugging it's useful to display why query was not
|
|
||||||
* router plannable.
|
|
||||||
*/
|
|
||||||
RaiseDeferredError(distributedPlan->planningError, DEBUG2);
|
RaiseDeferredError(distributedPlan->planningError, DEBUG2);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (hasUnresolvedParams)
|
if (hasUnresolvedParams)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue