mirror of https://github.com/citusdata/citus.git
Add order by to multi_subquery_complex_reference_clause
parent
d4dbe8f008
commit
1553e12ee4
|
@ -576,12 +576,13 @@ SELECT * FROM
|
||||||
users_table as "users"
|
users_table as "users"
|
||||||
WHERE
|
WHERE
|
||||||
user_id > 2 and value_2 = 1) as foo_in ON (event_val_2 = user_id)) as foo LEFT JOIN
|
user_id > 2 and value_2 = 1) as foo_in ON (event_val_2 = user_id)) as foo LEFT JOIN
|
||||||
(SELECT user_id as user_user_id FROM users_table) as fooo ON (user_id = user_user_id)) as bar;
|
(SELECT user_id as user_user_id FROM users_table) as fooo ON (user_id = user_user_id)) as bar
|
||||||
|
ORDER BY 1;
|
||||||
user_id
|
user_id
|
||||||
---------
|
---------
|
||||||
5
|
|
||||||
3
|
3
|
||||||
4
|
4
|
||||||
|
5
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- the same query but this time reference table is in the outer part of the query
|
-- the same query but this time reference table is in the outer part of the query
|
||||||
|
|
|
@ -354,7 +354,8 @@ SELECT * FROM
|
||||||
users_table as "users"
|
users_table as "users"
|
||||||
WHERE
|
WHERE
|
||||||
user_id > 2 and value_2 = 1) as foo_in ON (event_val_2 = user_id)) as foo LEFT JOIN
|
user_id > 2 and value_2 = 1) as foo_in ON (event_val_2 = user_id)) as foo LEFT JOIN
|
||||||
(SELECT user_id as user_user_id FROM users_table) as fooo ON (user_id = user_user_id)) as bar;
|
(SELECT user_id as user_user_id FROM users_table) as fooo ON (user_id = user_user_id)) as bar
|
||||||
|
ORDER BY 1;
|
||||||
|
|
||||||
-- the same query but this time reference table is in the outer part of the query
|
-- the same query but this time reference table is in the outer part of the query
|
||||||
SELECT * FROM
|
SELECT * FROM
|
||||||
|
|
Loading…
Reference in New Issue