code for Global-Partition-Index feature

Signed-off-by: xiliu <xiliu_h@163.com>
This commit is contained in:
xiliu
2020-08-25 15:10:14 +08:00
parent 339cd59f26
commit c040d78287
157 changed files with 12502 additions and 939 deletions

View File

@ -125,6 +125,18 @@ Node* MultiExecBitmapAnd(BitmapAndState* node)
if (result == NULL) {
result = subresult; /* first subplan */
} else {
/*
* If the global tbm intersect with non-global tbm,
* set the final result to non-global tbm.
*
* Notes: This scenario means that the two filter criteria used in the where
* condition of the sql statement, one uses the local partitioned index and
* the other uses the global partitioned index
*/
if (tbm_is_global(result) != tbm_is_global(subresult)) {
tbm_set_global(result, false);
}
tbm_intersect(result, subresult);
tbm_free(subresult);
}