mirror of https://github.com/citusdata/citus.git
Re-disable master evaluation for SELECT
parent
2dcca0939b
commit
02d2b86e68
|
@ -1474,7 +1474,7 @@ RouterQueryJob(Query *query, Task *task, List *placementList)
|
|||
Job *job = NULL;
|
||||
List *taskList = NIL;
|
||||
TaskType taskType = task->taskType;
|
||||
bool requiresMasterEvaluation = RequiresMasterEvaluation(query);
|
||||
bool requiresMasterEvaluation = false;
|
||||
|
||||
/*
|
||||
* We send modify task to the first replica, otherwise we choose the target shard
|
||||
|
@ -1484,6 +1484,7 @@ RouterQueryJob(Query *query, Task *task, List *placementList)
|
|||
if (taskType == MODIFY_TASK)
|
||||
{
|
||||
taskList = FirstReplicaAssignTaskList(list_make1(task));
|
||||
requiresMasterEvaluation = RequiresMasterEvaluation(query);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -524,6 +524,23 @@ DETAIL: Join types other than inner/outer joins are currently unsupported
|
|||
SELECT * FROM articles_hash WHERE author_id = (SELECT 1);
|
||||
ERROR: cannot perform distributed planning on this query
|
||||
DETAIL: Subqueries other than in from-clause are currently unsupported
|
||||
-- unless the query can be transformed into a join
|
||||
SELECT * FROM articles_hash
|
||||
WHERE author_id IN (SELECT author_id FROM articles_hash WHERE author_id = 2)
|
||||
ORDER BY articles_hash.id;
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: predicate pruning for shardId 840000
|
||||
DEBUG: Creating router plan
|
||||
DEBUG: Plan is router executable
|
||||
id | author_id | title | word_count
|
||||
----+-----------+------------+------------
|
||||
2 | 2 | abducing | 13642
|
||||
12 | 2 | archiblast | 18185
|
||||
22 | 2 | antipope | 2728
|
||||
32 | 2 | amazon | 11342
|
||||
42 | 2 | ausable | 15885
|
||||
(5 rows)
|
||||
|
||||
-- subqueries are supported in FROM clause but they are not router plannable
|
||||
SELECT articles_hash.id,test.word_count
|
||||
FROM articles_hash, (SELECT id, word_count FROM articles_hash) AS test WHERE test.id = articles_hash.id
|
||||
|
|
|
@ -250,6 +250,10 @@ SELECT * FROM articles_hash WHERE author_id IN (SELECT author_id FROM articles_h
|
|||
|
||||
SELECT * FROM articles_hash WHERE author_id = (SELECT 1);
|
||||
|
||||
-- unless the query can be transformed into a join
|
||||
SELECT * FROM articles_hash
|
||||
WHERE author_id IN (SELECT author_id FROM articles_hash WHERE author_id = 2)
|
||||
ORDER BY articles_hash.id;
|
||||
|
||||
-- subqueries are supported in FROM clause but they are not router plannable
|
||||
SELECT articles_hash.id,test.word_count
|
||||
|
|
Loading…
Reference in New Issue