mirror of https://github.com/citusdata/citus.git
Enable the tests that are temporarily commented
This commit enables some of the regression tests that were commented out until all the development is done.pull/1340/head
parent
e86a867fbf
commit
315c813a24
|
@ -170,32 +170,29 @@ FROM
|
||||||
GROUP BY
|
GROUP BY
|
||||||
l_orderkey) AS unit_prices;
|
l_orderkey) AS unit_prices;
|
||||||
|
|
||||||
-- Check that we error out if there is union all.
|
-- Check that we error out if there is non relation subqueries
|
||||||
-- TEMPORARLY DISABLE UNION ALL
|
SELECT count(*) FROM
|
||||||
-- SELECT count(*) FROM
|
(
|
||||||
-- (
|
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
(SELECT 1::bigint)
|
||||||
-- (SELECT 1::bigint)
|
) b;
|
||||||
--) b;
|
|
||||||
|
|
||||||
---
|
|
||||||
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
|
|
||||||
---
|
|
||||||
-- Check that we error out if queries in union do not include partition columns.
|
-- Check that we error out if queries in union do not include partition columns.
|
||||||
|
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_partkey FROM lineitem_subquery)
|
(SELECT l_partkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
|
|
||||||
-- Check that we run union queries if partition column is selected.
|
-- Check that we run union queries if partition column is selected.
|
||||||
|
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
-- Check that we error out if inner query has limit but outer quers has not.
|
-- Check that we error out if inner query has limit but outer quers has not.
|
||||||
SELECT
|
SELECT
|
||||||
avg(o_totalprice/l_quantity)
|
avg(o_totalprice/l_quantity)
|
||||||
|
@ -273,23 +270,23 @@ WHERE
|
||||||
|
|
||||||
-- Check that if subquery is pulled, we don't error and run query properly.
|
-- Check that if subquery is pulled, we don't error and run query properly.
|
||||||
|
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
--SELECT l_orderkey FROM (
|
SELECT l_orderkey FROM (
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) a
|
) a
|
||||||
--WHERE l_orderkey = 1
|
WHERE l_orderkey = 1
|
||||||
--) b;
|
) b;
|
||||||
|
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
--SELECT * FROM (
|
SELECT * FROM (
|
||||||
--(SELECT * FROM lineitem_subquery) UNION
|
(SELECT * FROM lineitem_subquery) UNION
|
||||||
--(SELECT * FROM lineitem_subquery)
|
(SELECT * FROM lineitem_subquery)
|
||||||
--) a
|
) a
|
||||||
--WHERE l_orderkey = 1
|
WHERE l_orderkey = 1
|
||||||
--) b;
|
) b;
|
||||||
|
|
||||||
SELECT max(l_orderkey) FROM
|
SELECT max(l_orderkey) FROM
|
||||||
(
|
(
|
||||||
|
|
|
@ -174,28 +174,33 @@ FROM
|
||||||
l_orderkey) AS unit_prices;
|
l_orderkey) AS unit_prices;
|
||||||
ERROR: cannot pushdown the subquery since all relations are not joined using distribution keys
|
ERROR: cannot pushdown the subquery since all relations are not joined using distribution keys
|
||||||
DETAIL: Each relation should be joined with at least one another relation using distribution keys and equality operator.
|
DETAIL: Each relation should be joined with at least one another relation using distribution keys and equality operator.
|
||||||
-- Check that we error out if there is union all.
|
-- Check that we error out if there is non relation subqueries
|
||||||
-- TEMPORARLY DISABLE UNION ALL
|
SELECT count(*) FROM
|
||||||
-- SELECT count(*) FROM
|
(
|
||||||
-- (
|
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
(SELECT 1::bigint)
|
||||||
-- (SELECT 1::bigint)
|
) b;
|
||||||
--) b;
|
ERROR: cannot push down this subquery
|
||||||
---
|
DETAIL: Subqueries without relations are unsupported
|
||||||
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
|
|
||||||
---
|
|
||||||
-- Check that we error out if queries in union do not include partition columns.
|
-- Check that we error out if queries in union do not include partition columns.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_partkey FROM lineitem_subquery)
|
(SELECT l_partkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
|
ERROR: cannot pushdown the subquery since all leaves of the UNION does not include partition key at the same position
|
||||||
|
DETAIL: Each leaf query of the UNION should return partition key at the same position on its target list.
|
||||||
-- Check that we run union queries if partition column is selected.
|
-- Check that we run union queries if partition column is selected.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
2985
|
||||||
|
(1 row)
|
||||||
|
|
||||||
-- Check that we error out if inner query has limit but outer quers has not.
|
-- Check that we error out if inner query has limit but outer quers has not.
|
||||||
SELECT
|
SELECT
|
||||||
avg(o_totalprice/l_quantity)
|
avg(o_totalprice/l_quantity)
|
||||||
|
@ -289,22 +294,32 @@ WHERE
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Check that if subquery is pulled, we don't error and run query properly.
|
-- Check that if subquery is pulled, we don't error and run query properly.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
--SELECT l_orderkey FROM (
|
SELECT l_orderkey FROM (
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) a
|
) a
|
||||||
--WHERE l_orderkey = 1
|
WHERE l_orderkey = 1
|
||||||
--) b;
|
) b;
|
||||||
--SELECT count(*) FROM
|
count
|
||||||
--(
|
-------
|
||||||
--SELECT * FROM (
|
1
|
||||||
--(SELECT * FROM lineitem_subquery) UNION
|
(1 row)
|
||||||
--(SELECT * FROM lineitem_subquery)
|
|
||||||
--) a
|
SELECT count(*) FROM
|
||||||
--WHERE l_orderkey = 1
|
(
|
||||||
--) b;
|
SELECT * FROM (
|
||||||
|
(SELECT * FROM lineitem_subquery) UNION
|
||||||
|
(SELECT * FROM lineitem_subquery)
|
||||||
|
) a
|
||||||
|
WHERE l_orderkey = 1
|
||||||
|
) b;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
6
|
||||||
|
(1 row)
|
||||||
|
|
||||||
SELECT max(l_orderkey) FROM
|
SELECT max(l_orderkey) FROM
|
||||||
(
|
(
|
||||||
SELECT l_orderkey FROM (
|
SELECT l_orderkey FROM (
|
||||||
|
|
|
@ -174,28 +174,33 @@ FROM
|
||||||
l_orderkey) AS unit_prices;
|
l_orderkey) AS unit_prices;
|
||||||
ERROR: cannot pushdown the subquery since all relations are not joined using distribution keys
|
ERROR: cannot pushdown the subquery since all relations are not joined using distribution keys
|
||||||
DETAIL: Each relation should be joined with at least one another relation using distribution keys and equality operator.
|
DETAIL: Each relation should be joined with at least one another relation using distribution keys and equality operator.
|
||||||
-- Check that we error out if there is union all.
|
-- Check that we error out if there is non relation subqueries
|
||||||
-- TEMPORARLY DISABLE UNION ALL
|
SELECT count(*) FROM
|
||||||
-- SELECT count(*) FROM
|
(
|
||||||
-- (
|
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
|
(SELECT 1::bigint)
|
||||||
-- (SELECT 1::bigint)
|
) b;
|
||||||
--) b;
|
ERROR: cannot push down this subquery
|
||||||
---
|
DETAIL: Subqueries without relations are unsupported
|
||||||
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
|
|
||||||
---
|
|
||||||
-- Check that we error out if queries in union do not include partition columns.
|
-- Check that we error out if queries in union do not include partition columns.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_partkey FROM lineitem_subquery)
|
(SELECT l_partkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
|
ERROR: cannot pushdown the subquery since all leaves of the UNION does not include partition key at the same position
|
||||||
|
DETAIL: Each leaf query of the UNION should return partition key at the same position on its target list.
|
||||||
-- Check that we run union queries if partition column is selected.
|
-- Check that we run union queries if partition column is selected.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
-- (SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) b;
|
) b;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
2985
|
||||||
|
(1 row)
|
||||||
|
|
||||||
-- Check that we error out if inner query has limit but outer quers has not.
|
-- Check that we error out if inner query has limit but outer quers has not.
|
||||||
SELECT
|
SELECT
|
||||||
avg(o_totalprice/l_quantity)
|
avg(o_totalprice/l_quantity)
|
||||||
|
@ -289,22 +294,32 @@ WHERE
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- Check that if subquery is pulled, we don't error and run query properly.
|
-- Check that if subquery is pulled, we don't error and run query properly.
|
||||||
--SELECT count(*) FROM
|
SELECT count(*) FROM
|
||||||
--(
|
(
|
||||||
--SELECT l_orderkey FROM (
|
SELECT l_orderkey FROM (
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery) UNION
|
(SELECT l_orderkey FROM lineitem_subquery) UNION
|
||||||
--(SELECT l_orderkey FROM lineitem_subquery)
|
(SELECT l_orderkey FROM lineitem_subquery)
|
||||||
--) a
|
) a
|
||||||
--WHERE l_orderkey = 1
|
WHERE l_orderkey = 1
|
||||||
--) b;
|
) b;
|
||||||
--SELECT count(*) FROM
|
count
|
||||||
--(
|
-------
|
||||||
--SELECT * FROM (
|
1
|
||||||
--(SELECT * FROM lineitem_subquery) UNION
|
(1 row)
|
||||||
--(SELECT * FROM lineitem_subquery)
|
|
||||||
--) a
|
SELECT count(*) FROM
|
||||||
--WHERE l_orderkey = 1
|
(
|
||||||
--) b;
|
SELECT * FROM (
|
||||||
|
(SELECT * FROM lineitem_subquery) UNION
|
||||||
|
(SELECT * FROM lineitem_subquery)
|
||||||
|
) a
|
||||||
|
WHERE l_orderkey = 1
|
||||||
|
) b;
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
6
|
||||||
|
(1 row)
|
||||||
|
|
||||||
SELECT max(l_orderkey) FROM
|
SELECT max(l_orderkey) FROM
|
||||||
(
|
(
|
||||||
SELECT l_orderkey FROM (
|
SELECT l_orderkey FROM (
|
||||||
|
|
Loading…
Reference in New Issue