Revert "temp commit for multi task router"

This reverts commit c05ccde171ea254faffdc0e605e05e1b3ef0c576.
pull/896/head
Onder Kalaci 2016-10-20 11:44:38 +03:00
parent 66ab79bc42
commit 9c0bb3fb00
2 changed files with 20 additions and 31 deletions

View File

@ -127,32 +127,18 @@ RouterExecutablePlan(MultiPlan *multiPlan, MultiExecutorType executorType)
List *workerDependentTaskList = NIL; List *workerDependentTaskList = NIL;
bool masterQueryHasAggregates = false; bool masterQueryHasAggregates = false;
if (executorType == MULTI_EXECUTOR_TASK_TRACKER) /* TODO: this is a hacky solution to allow 0 shard INSERT ... SELECT */
{ if (masterQuery == NULL)
return false;
}
/* router executor cannot execute repartition jobs */
if (dependedJobCount > 0)
{
return false;
}
/* router executor cannot execute plans when master query is present */
if (masterQuery != NULL)
{
return false;
}
/*
* Multi task router executor can execute plans with zero task. This is currently
* here for INSERT ... SELECT queries with zero shards.
*/
if (taskCount == 0)
{ {
return true; return true;
} }
/* router executor cannot execute queries that hit zero shards */
if (taskCount == 0)
{
return false;
}
/* check if the first task is a modify or a router task, short-circuit if so */ /* check if the first task is a modify or a router task, short-circuit if so */
workerTask = (Task *) linitial(workerTaskList); workerTask = (Task *) linitial(workerTaskList);
taskType = workerTask->taskType; taskType = workerTask->taskType;
@ -162,7 +148,18 @@ RouterExecutablePlan(MultiPlan *multiPlan, MultiExecutorType executorType)
} }
/* router executor cannot execute SELECT queries that hit more than one shard */ /* router executor cannot execute SELECT queries that hit more than one shard */
if (taskCount != 1 && taskType == ROUTER_TASK) if (taskCount != 1)
{
return false;
}
if (executorType == MULTI_EXECUTOR_TASK_TRACKER)
{
return false;
}
/* router executor cannot execute repartition jobs */
if (dependedJobCount > 0)
{ {
return false; return false;
} }

View File

@ -101,14 +101,6 @@ FROM
WHERE WHERE
0 != 0; 0 != 0;
INSERT INTO raw_events_second (value_2, value_1, value_3, value_4, user_id, time)
SELECT
value_2, value_1, value_3, value_4, user_id, time
FROM
raw_events_first
WHERE
user_id = 15 AND user_id = 16;
-- add one more row -- add one more row
SET client_min_messages TO INFO; SET client_min_messages TO INFO;
INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4) VALUES INSERT INTO raw_events_first (user_id, time, value_1, value_2, value_3, value_4) VALUES