MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecInitSeqScanForPartition

Function ExecInitSeqScanForPartition

src/backend/executor/nodeSeqscan.c:176–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176SeqScanState *
177ExecInitSeqScanForPartition(SeqScan *node, EState *estate,
178 Relation currentRelation)
179{
180 SeqScanState *scanstate;
181
182 /*
183 * Once upon a time it was possible to have an outerPlan of a SeqScan, but
184 * not any more.
185 */
186 Assert(outerPlan(node) == NULL);
187 Assert(innerPlan(node) == NULL);
188
189 /*
190 * create state structure
191 */
192 scanstate = makeNode(SeqScanState);
193 scanstate->ss.ps.plan = (Plan *) node;
194 scanstate->ss.ps.state = estate;
195 scanstate->ss.ps.ExecProcNode = ExecSeqScan;
196
197 /*
198 * Miscellaneous initialization
199 *
200 * create expression context for node
201 */
202 ExecAssignExprContext(estate, &scanstate->ss.ps);
203
204 /*
205 * open the scan relation
206 */
207 scanstate->ss.ss_currentRelation = currentRelation;
208
209 /* and create slot with the appropriate rowtype */
210 ExecInitScanTupleSlot(estate, &scanstate->ss,
211 RelationGetDescr(scanstate->ss.ss_currentRelation),
212 table_slot_callbacks(scanstate->ss.ss_currentRelation));
213
214 /*
215 * Initialize result type and projection.
216 */
217 ExecInitResultTypeTL(&scanstate->ss.ps);
218 ExecAssignScanProjectionInfo(&scanstate->ss);
219
220 /*
221 * initialize child expressions
222 */
223 scanstate->ss.ps.qual =
224 ExecInitQual(node->plan.qual, (PlanState *) scanstate);
225
226 /*
227 * check scan slot with bloom filters in seqscan node or not.
228 */
229 if (gp_enable_runtime_filter_pushdown
230 && !estate->useMppParallelMode)
231 {
232 scanstate->filter_in_seqscan = true;
233 }

Callers 2

initNextTableToScanFunction · 0.85
ExecInitSeqScanFunction · 0.85

Calls 6

ExecAssignExprContextFunction · 0.85
ExecInitScanTupleSlotFunction · 0.85
table_slot_callbacksFunction · 0.85
ExecInitResultTypeTLFunction · 0.85
ExecInitQualFunction · 0.85

Tested by

no test coverage detected