31 #define MAX_TUPLE_STORE 10
53 bool nowait,
bool *done);
302 if (node->
pei != NULL)
318 if (node->
pei != NULL)
410 for (
i = 0;
i < nreaders;
i++)
449 for (
i = 0;
i < nreaders;
i++)
471 for (
i = 0;
i <= nreaders;
i++)
498 for (
i = 1;
i <= nreaders;
i++)
613 &tuple_buffer->
done);
616 tuple_buffer->
tuple[
i] = tuple;
653 gm_state->
gm_slots[0] = outerTupleSlot;
670 else if (tuple_buffer->
done)
681 &tuple_buffer->
done);
724 reader = gm_state->
reader[nreader - 1];
758 for (nkey = 0; nkey < node->
gm_nkeys; nkey++)
void LaunchParallelWorkers(ParallelContext *pcxt)
void binaryheap_build(binaryheap *heap)
void binaryheap_replace_first(binaryheap *heap, bh_node_type d)
void binaryheap_reset(binaryheap *heap)
bh_node_type binaryheap_first(binaryheap *heap)
bh_node_type binaryheap_remove_first(binaryheap *heap)
binaryheap * binaryheap_allocate(int capacity, binaryheap_comparator compare, void *arg)
void binaryheap_add_unordered(binaryheap *heap, bh_node_type d)
#define binaryheap_empty(h)
Bitmapset * bms_add_member(Bitmapset *a, int x)
#define INVERT_COMPARE_RESULT(var)
#define Assert(condition)
void ExecReScan(PlanState *node)
void ExecParallelCleanup(ParallelExecutorInfo *pei)
ParallelExecutorInfo * ExecInitParallelPlan(PlanState *planstate, EState *estate, Bitmapset *sendParams, int nworkers, int64 tuples_needed)
void ExecParallelReinitialize(PlanState *planstate, ParallelExecutorInfo *pei, Bitmapset *sendParams)
void ExecParallelCreateReaders(ParallelExecutorInfo *pei)
void ExecParallelFinish(ParallelExecutorInfo *pei)
void ExecEndNode(PlanState *node)
PlanState * ExecInitNode(Plan *node, EState *estate, int eflags)
TupleTableSlot * ExecStoreMinimalTuple(MinimalTuple mtup, TupleTableSlot *slot, bool shouldFree)
void ExecInitResultTypeTL(PlanState *planstate)
TupleTableSlot * ExecInitExtraTupleSlot(EState *estate, TupleDesc tupledesc, const TupleTableSlotOps *tts_ops)
const TupleTableSlotOps TTSOpsMinimalTuple
TupleDesc ExecGetResultType(PlanState *planstate)
void ExecAssignExprContext(EState *estate, PlanState *planstate)
void ExecConditionalAssignProjectionInfo(PlanState *planstate, TupleDesc inputDesc, int varno)
#define outerPlanState(node)
static TupleTableSlot * ExecProject(ProjectionInfo *projInfo)
#define ResetExprContext(econtext)
static TupleTableSlot * ExecProcNode(PlanState *node)
static int compare(const void *arg1, const void *arg2)
MinimalTuple heap_copy_minimal_tuple(MinimalTuple mtup)
void pfree(void *pointer)
void * palloc0(Size size)
MemoryContext CurrentMemoryContext
#define CHECK_FOR_INTERRUPTS()
struct GMReaderTupleBuffer GMReaderTupleBuffer
static void gather_merge_init(GatherMergeState *gm_state)
static void gather_merge_setup(GatherMergeState *gm_state)
static int32 heap_compare_slots(Datum a, Datum b, void *arg)
void ExecReScanGatherMerge(GatherMergeState *node)
GatherMergeState * ExecInitGatherMerge(GatherMerge *node, EState *estate, int eflags)
static void gather_merge_clear_tuples(GatherMergeState *gm_state)
void ExecShutdownGatherMerge(GatherMergeState *node)
static void load_tuple_array(GatherMergeState *gm_state, int reader)
static bool gather_merge_readnext(GatherMergeState *gm_state, int reader, bool nowait)
static void ExecShutdownGatherMergeWorkers(GatherMergeState *node)
static MinimalTuple gm_readnext_tuple(GatherMergeState *gm_state, int nreader, bool nowait, bool *done)
void ExecEndGatherMerge(GatherMergeState *node)
static TupleTableSlot * gather_merge_getnext(GatherMergeState *gm_state)
static TupleTableSlot * ExecGatherMerge(PlanState *pstate)
#define castNode(_type_, nodeptr)
bool parallel_leader_participation
static Datum Int32GetDatum(int32 X)
static int32 DatumGetInt32(Datum X)
void PrepareSortSupportFromOrderingOp(Oid orderingOp, SortSupport ssup)
static int ApplySortComparator(Datum datum1, bool isNull1, Datum datum2, bool isNull2, SortSupport ssup)
struct dsa_area * es_query_dsa
bool es_use_parallel_mode
TupleTableSlot * ecxt_outertuple
struct ParallelExecutorInfo * pei
struct TupleQueueReader ** reader
struct GMReaderTupleBuffer * gm_tuple_buffers
TupleTableSlot ** gm_slots
bool need_to_scan_locally
struct binaryheap * gm_heap
struct TupleQueueReader ** reader
ExprContext * ps_ExprContext
ProjectionInfo * ps_ProjInfo
ExecProcNodeMtd ExecProcNode
MinimalTuple TupleQueueReaderNext(TupleQueueReader *reader, bool nowait, bool *done)
static TupleTableSlot * ExecClearTuple(TupleTableSlot *slot)
static Datum slot_getattr(TupleTableSlot *slot, int attnum, bool *isnull)