PostgreSQL Source Code: src/backend/executor/nodeBitmapOr.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
34
35
36
37
38
39
40
41
44{
45 elog(ERROR, "BitmapOr node does not support ExecProcNode call convention");
46 return NULL;
47}
48
49
50
51
52
53
54
57{
60 int nplans;
61 int i;
63 Plan *initNode;
64
65
67
68
69
70
72
74
75
76
77
78 bitmaporstate->ps.plan = (Plan *) node;
79 bitmaporstate->ps.state = estate;
81 bitmaporstate->bitmapplans = bitmapplanstates;
82 bitmaporstate->nplans = nplans;
83
84
85
86
87
88 i = 0;
90 {
92 bitmapplanstates[i] = ExecInitNode(initNode, estate, eflags);
93 i++;
94 }
95
96
97
98
99
100
101
102
103 return bitmaporstate;
104}
105
106
107
108
109
112{
114 int nplans;
115 int i;
117
118
121
122
123
124
126 nplans = node->nplans;
127
128
129
130
131 for (i = 0; i < nplans; i++)
132 {
135
136
137
138
139
140
142 {
143 if (result == NULL)
144 {
145
149 }
150
152
154
155 if (subresult != result)
156 elog(ERROR, "unrecognized result from subplan");
157 }
158 else
159 {
160
162
163 if (!subresult || (subresult, TIDBitmap))
164 elog(ERROR, "unrecognized result from subplan");
165
166 if (result == NULL)
167 result = subresult;
168 else
169 {
172 }
173 }
174 }
175
176
177 if (result == NULL)
178 elog(ERROR, "BitmapOr doesn't support zero inputs");
179
180
183
184 return (Node *) result;
185}
186
187
188
189
190
191
192
193
194
195void
197{
199 int nplans;
200 int i;
201
202
203
204
206 nplans = node->nplans;
207
208
209
210
211 for (i = 0; i < nplans; i++)
212 {
213 if (bitmapplans[i])
215 }
216}
217
218void
220{
221 int i;
222
223 for (i = 0; i < node->nplans; i++)
224 {
226
227
228
229
230
233
234
235
236
237
238 if (subnode->chgParam == NULL)
240 }
241}
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)
void ExecEndBitmapOr(BitmapOrState *node)
Node * MultiExecBitmapOr(BitmapOrState *node)
void ExecReScanBitmapOr(BitmapOrState *node)
BitmapOrState * ExecInitBitmapOr(BitmapOr *node, EState *estate, int eflags)
static TupleTableSlot * ExecBitmapOr(PlanState *pstate)
#define IsA(nodeptr, _type_)
static int list_length(const List *l)
struct dsa_area * es_query_dsa
Instrumentation * instrument
ExecProcNodeMtd ExecProcNode
void tbm_free(TIDBitmap *tbm)
void tbm_union(TIDBitmap *a, const TIDBitmap *b)
TIDBitmap * tbm_create(Size maxbytes, dsa_area *dsa)