mirror of https://github.com/citusdata/citus.git
Bakc
parent
fb33900669
commit
1a20c4fe6d
|
@ -897,6 +897,7 @@ AdaptiveExecutor(CitusScanState *scanState)
|
|||
|
||||
FinishDistributedExecution(execution);
|
||||
|
||||
job->jobExecuted = true;
|
||||
if (SortReturning && distributedPlan->expectResults && commandType != CMD_SELECT)
|
||||
{
|
||||
SortTupleStore(scanState);
|
||||
|
|
|
@ -41,12 +41,17 @@ ExecuteSubPlans(DistributedPlan *distributedPlan)
|
|||
uint64 planId = distributedPlan->planId;
|
||||
List *subPlanList = distributedPlan->subPlanList;
|
||||
|
||||
if (distributedPlan->workerJob)
|
||||
distributedPlan->workerJob->jobExecuted = true;
|
||||
distributedPlan->subPlansExecuted = true;
|
||||
|
||||
if (subPlanList == NIL)
|
||||
{
|
||||
/* no subplans to execute */
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
HTAB *intermediateResultsHash = MakeIntermediateResultHTAB();
|
||||
RecordSubplanExecutionsOnNodes(intermediateResultsHash, distributedPlan);
|
||||
|
||||
|
|
|
@ -1395,6 +1395,7 @@ FinalizePlan(PlannedStmt *localPlan, DistributedPlan *distributedPlan)
|
|||
PlannedStmt *finalPlan = NULL;
|
||||
CustomScan *customScan = makeNode(CustomScan);
|
||||
MultiExecutorType executorType = MULTI_EXECUTOR_INVALID_FIRST;
|
||||
distributedPlan->subPlansExecuted = false;
|
||||
|
||||
/* this field is used in JobExecutorType */
|
||||
distributedPlan->relationIdList = localPlan->relationOids;
|
||||
|
|
|
@ -625,7 +625,7 @@ ExplainJob(CitusScanState *scanState, Job *job, ExplainState *es,
|
|||
ExplainOpenGroup("Job", "Job", true, es);
|
||||
|
||||
ExplainPropertyInteger("Task Count", NULL, taskCount, es);
|
||||
if (ShowReceivedTupleData(scanState, es))
|
||||
if (ShowReceivedTupleData(scanState, es) || job->jobExecuted)
|
||||
{
|
||||
Task *task = NULL;
|
||||
uint64 totalReceivedTupleDataForAllTasks = 0;
|
||||
|
|
|
@ -1692,6 +1692,7 @@ CreateJob(Query *query)
|
|||
job->subqueryPushdown = false;
|
||||
job->requiresCoordinatorEvaluation = false;
|
||||
job->deferredPruning = false;
|
||||
job->jobExecuted = false;
|
||||
|
||||
return job;
|
||||
}
|
||||
|
@ -1791,6 +1792,7 @@ CreateTask(TaskType taskType)
|
|||
task->modifyWithSubquery = false;
|
||||
task->partiallyLocalOrRemote = false;
|
||||
task->relationShardList = NIL;
|
||||
task->taskCompleted = false;
|
||||
|
||||
return task;
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ typedef struct Job
|
|||
*/
|
||||
bool parametersInJobQueryResolved;
|
||||
uint32 colocationId; /* common colocation group ID of the relations */
|
||||
bool jobExecuted;
|
||||
} Job;
|
||||
|
||||
|
||||
|
@ -334,6 +335,7 @@ typedef struct Task
|
|||
|
||||
Const *partitionKeyValue;
|
||||
int colocationId;
|
||||
bool taskCompleted;
|
||||
} Task;
|
||||
|
||||
|
||||
|
@ -471,6 +473,7 @@ typedef struct DistributedPlan
|
|||
* of source rows to be repartitioned for colocation with the target.
|
||||
*/
|
||||
int sourceResultRepartitionColumnIndex;
|
||||
bool subPlansExecuted;
|
||||
} DistributedPlan;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue