mirror of https://github.com/citusdata/citus.git
Again, related to outer join checks
parent
1dc8c1037c
commit
a2c8dc65ce
|
@ -1267,6 +1267,21 @@ AddRteSubqueryToAttributeEquivalenceClass(AttributeEquivalenceClass
|
|||
PlannerInfo *root,
|
||||
Var *varToBeAdded)
|
||||
{
|
||||
|
||||
|
||||
if (root->simple_rel_array_size <= varToBeAdded->varno)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
RelOptInfo *rel = root->simple_rel_array[varToBeAdded->varno];
|
||||
if (rel == NULL)
|
||||
{
|
||||
/* must be an outer join*/
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
RelOptInfo *baseRelOptInfo = find_base_rel(root, varToBeAdded->varno);
|
||||
Query *targetSubquery = GetTargetSubquery(root, rangeTableEntry, varToBeAdded);
|
||||
|
||||
|
@ -1357,6 +1372,18 @@ GetTargetSubquery(PlannerInfo *root, RangeTblEntry *rangeTableEntry, Var *varToB
|
|||
*/
|
||||
if (!rangeTableEntry->inh)
|
||||
{
|
||||
if (root->simple_rel_array_size <= varToBeAdded->varno)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RelOptInfo *rel = root->simple_rel_array[varToBeAdded->varno];
|
||||
if (rel == NULL)
|
||||
{
|
||||
/* must be an outer join*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RelOptInfo *baseRelOptInfo = find_base_rel(root, varToBeAdded->varno);
|
||||
|
||||
/* If the targetSubquery was not planned, we have to punt */
|
||||
|
|
Loading…
Reference in New Issue