diff --git a/src/backend/distributed/executor/adaptive_executor.c b/src/backend/distributed/executor/adaptive_executor.c index 8c4dbe7b4..cecb544ac 100644 --- a/src/backend/distributed/executor/adaptive_executor.c +++ b/src/backend/distributed/executor/adaptive_executor.c @@ -600,9 +600,8 @@ static TaskExecutionState TaskExecutionStateMachine(ShardCommandExecution * * of the input scanScate. */ TupleTableSlot * -AdaptiveExecutor(CustomScanState *node) +AdaptiveExecutor(CitusScanState *scanState) { - CitusScanState *scanState = (CitusScanState *) node; TupleTableSlot *resultSlot = NULL; DistributedPlan *distributedPlan = scanState->distributedPlan; diff --git a/src/backend/distributed/executor/citus_custom_scan.c b/src/backend/distributed/executor/citus_custom_scan.c index 3f253f110..674296e6e 100644 --- a/src/backend/distributed/executor/citus_custom_scan.c +++ b/src/backend/distributed/executor/citus_custom_scan.c @@ -193,7 +193,7 @@ CitusExecScan(CustomScanState *node) if (!scanState->finishedRemoteScan) { - AdaptiveExecutor(node); + AdaptiveExecutor(scanState); scanState->finishedRemoteScan = true; } diff --git a/src/include/distributed/multi_executor.h b/src/include/distributed/multi_executor.h index 5273b9dcc..8c1181627 100644 --- a/src/include/distributed/multi_executor.h +++ b/src/include/distributed/multi_executor.h @@ -37,7 +37,7 @@ extern int ExecutorSlowStartInterval; extern void CitusExecutorStart(QueryDesc *queryDesc, int eflags); extern void CitusExecutorRun(QueryDesc *queryDesc, ScanDirection direction, uint64 count, bool execute_once); -extern TupleTableSlot * AdaptiveExecutor(CustomScanState *node); +extern TupleTableSlot * AdaptiveExecutor(CitusScanState *scanState); extern uint64 ExecuteTaskListExtended(RowModifyLevel modLevel, List *taskList, TupleDesc tupleDescriptor, Tuplestorestate *tupleStore,