mirror of https://github.com/citusdata/citus.git
Fix having clause bug for complex joins
We update column attributes of various clauses for a query inluding target columns, select clauses when we introduce new range table entries in the query. It seems having clause column attributes were not updated. This fix resolves the issuepull/2569/head
parent
1d421e60f9
commit
2ed7d24591
|
@ -688,6 +688,18 @@ BuildJobQuery(MultiNode *multiNode, List *dependedJobList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* set correct column attributes for having columns */
|
||||||
|
if (updateColumnAttributes)
|
||||||
|
{
|
||||||
|
columnCell = NULL;
|
||||||
|
columnList = pull_var_clause_default((Node *) havingQual);
|
||||||
|
foreach(columnCell, columnList)
|
||||||
|
{
|
||||||
|
Var *column = (Var *) lfirst(columnCell);
|
||||||
|
UpdateColumnAttributes(column, rangeTableList, dependedJobList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Build the From/Where construct. We keep the where-clause list implicitly
|
* Build the From/Where construct. We keep the where-clause list implicitly
|
||||||
* AND'd, since both partition and join pruning depends on the clauses being
|
* AND'd, since both partition and join pruning depends on the clauses being
|
||||||
|
|
Loading…
Reference in New Issue