PostgreSQL Source Code: src/backend/executor/nodeBitmapAnd.c Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
30
33
34
35
36
37
38
39
40
43{
44 elog(ERROR, "BitmapAnd node does not support ExecProcNode call convention");
45 return NULL;
46}
47
48
49
50
51
52
53
56{
59 int nplans;
60 int i;
62 Plan *initNode;
63
64
66
67
68
69
71
73
74
75
76
77 bitmapandstate->ps.plan = (Plan *) node;
78 bitmapandstate->ps.state = estate;
80 bitmapandstate->bitmapplans = bitmapplanstates;
81 bitmapandstate->nplans = nplans;
82
83
84
85
86
87 i = 0;
89 {
91 bitmapplanstates[i] = ExecInitNode(initNode, estate, eflags);
92 i++;
93 }
94
95
96
97
98
99
100
101
102 return bitmapandstate;
103}
104
105
106
107
108
111{
113 int nplans;
114 int i;
116
117
120
121
122
123
125 nplans = node->nplans;
126
127
128
129
130 for (i = 0; i < nplans; i++)
131 {
134
136
137 if (!subresult || (subresult, TIDBitmap))
138 elog(ERROR, "unrecognized result from subplan");
139
140 if (result == NULL)
141 result = subresult;
142 else
143 {
146 }
147
148
149
150
151
152
153
154
156 break;
157 }
158
159 if (result == NULL)
160 elog(ERROR, "BitmapAnd doesn't support zero inputs");
161
162
165
166 return (Node *) result;
167}
168
169
170
171
172
173
174
175
176
177void
179{
181 int nplans;
182 int i;
183
184
185
186
188 nplans = node->nplans;
189
190
191
192
193 for (i = 0; i < nplans; i++)
194 {
195 if (bitmapplans[i])
197 }
198}
199
200void
202{
203 int i;
204
205 for (i = 0; i < node->nplans; i++)
206 {
208
209
210
211
212
215
216
217
218
219
220 if (subnode->chgParam == NULL)
222 }
223}
void ExecReScan(PlanState *node)
Node * MultiExecProcNode(PlanState *node)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
#define EXEC_FLAG_BACKWARD
Assert(PointerIsAligned(start, uint64))
void InstrStartNode(Instrumentation *instr)
void InstrStopNode(Instrumentation *instr, double nTuples)
void * palloc0(Size size)
BitmapAndState * ExecInitBitmapAnd(BitmapAnd *node, EState *estate, int eflags)
Node * MultiExecBitmapAnd(BitmapAndState *node)
void ExecEndBitmapAnd(BitmapAndState *node)
static TupleTableSlot * ExecBitmapAnd(PlanState *pstate)
void ExecReScanBitmapAnd(BitmapAndState *node)
#define IsA(nodeptr, _type_)
static int list_length(const List *l)
Instrumentation * instrument
ExecProcNodeMtd ExecProcNode
void tbm_free(TIDBitmap *tbm)
bool tbm_is_empty(const TIDBitmap *tbm)
void tbm_intersect(TIDBitmap *a, const TIDBitmap *b)