mirror of https://github.com/citusdata/citus.git
Plan CTEs when subquery pushdown is on
parent
686b079272
commit
e3b953b8e3
|
@ -140,6 +140,17 @@ RecursivelyPlanSubqueriesAndCTEs(Query *query,
|
||||||
DeferredErrorMessage *error = NULL;
|
DeferredErrorMessage *error = NULL;
|
||||||
RecursivePlanningContext context;
|
RecursivePlanningContext context;
|
||||||
|
|
||||||
|
context.level = 0;
|
||||||
|
context.planId = planId;
|
||||||
|
context.subPlanList = NIL;
|
||||||
|
context.plannerRestrictionContext = plannerRestrictionContext;
|
||||||
|
|
||||||
|
error = RecursivelyPlanCTEs(query, &context);
|
||||||
|
if (error != NULL)
|
||||||
|
{
|
||||||
|
return error;
|
||||||
|
}
|
||||||
|
|
||||||
if (SubqueryPushdown)
|
if (SubqueryPushdown)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -155,17 +166,6 @@ RecursivelyPlanSubqueriesAndCTEs(Query *query,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
context.level = 0;
|
|
||||||
context.planId = planId;
|
|
||||||
context.subPlanList = NIL;
|
|
||||||
context.plannerRestrictionContext = plannerRestrictionContext;
|
|
||||||
|
|
||||||
error = RecursivelyPlanCTEs(query, &context);
|
|
||||||
if (error != NULL)
|
|
||||||
{
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* XXX: plan subqueries */
|
/* XXX: plan subqueries */
|
||||||
|
|
||||||
*subPlanList = context.subPlanList;
|
*subPlanList = context.subPlanList;
|
||||||
|
|
Loading…
Reference in New Issue