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
Onder Kalaci 2017-04-19 11:23:44 +03:00
parent e86a867fbf
commit 315c813a24
3 changed files with 135 additions and 108 deletions

View File

@ -170,32 +170,29 @@ FROM
GROUP BY
l_orderkey) AS unit_prices;
-- Check that we error out if there is union all.
-- TEMPORARLY DISABLE UNION ALL
-- SELECT count(*) FROM
-- (
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
-- (SELECT 1::bigint)
--) b;
-- Check that we error out if there is non relation subqueries
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
(SELECT 1::bigint)
) b;
---
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
---
-- Check that we error out if queries in union do not include partition columns.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_partkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_partkey FROM lineitem_subquery)
) b;
-- Check that we run union queries if partition column is selected.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_orderkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) b;
-- Check that we error out if inner query has limit but outer quers has not.
SELECT
avg(o_totalprice/l_quantity)
@ -273,23 +270,23 @@ WHERE
-- Check that if subquery is pulled, we don't error and run query properly.
--SELECT count(*) FROM
--(
--SELECT l_orderkey FROM (
--(SELECT l_orderkey FROM lineitem_subquery) UNION
--(SELECT l_orderkey FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
SELECT count(*) FROM
(
SELECT l_orderkey FROM (
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) a
WHERE l_orderkey = 1
) b;
--SELECT count(*) FROM
--(
--SELECT * FROM (
--(SELECT * FROM lineitem_subquery) UNION
--(SELECT * FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
SELECT count(*) FROM
(
SELECT * FROM (
(SELECT * FROM lineitem_subquery) UNION
(SELECT * FROM lineitem_subquery)
) a
WHERE l_orderkey = 1
) b;
SELECT max(l_orderkey) FROM
(

View File

@ -174,28 +174,33 @@ FROM
l_orderkey) AS unit_prices;
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.
-- Check that we error out if there is union all.
-- TEMPORARLY DISABLE UNION ALL
-- SELECT count(*) FROM
-- (
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
-- (SELECT 1::bigint)
--) b;
---
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
---
-- Check that we error out if there is non relation subqueries
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
(SELECT 1::bigint)
) b;
ERROR: cannot push down this subquery
DETAIL: Subqueries without relations are unsupported
-- Check that we error out if queries in union do not include partition columns.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_partkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_partkey FROM lineitem_subquery)
) 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.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_orderkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) b;
count
-------
2985
(1 row)
-- Check that we error out if inner query has limit but outer quers has not.
SELECT
avg(o_totalprice/l_quantity)
@ -289,22 +294,32 @@ WHERE
(1 row)
-- Check that if subquery is pulled, we don't error and run query properly.
--SELECT count(*) FROM
--(
--SELECT l_orderkey FROM (
--(SELECT l_orderkey FROM lineitem_subquery) UNION
--(SELECT l_orderkey FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
--SELECT count(*) FROM
--(
--SELECT * FROM (
--(SELECT * FROM lineitem_subquery) UNION
--(SELECT * FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
SELECT count(*) FROM
(
SELECT l_orderkey FROM (
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) a
WHERE l_orderkey = 1
) b;
count
-------
1
(1 row)
SELECT count(*) FROM
(
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 l_orderkey FROM (

View File

@ -174,28 +174,33 @@ FROM
l_orderkey) AS unit_prices;
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.
-- Check that we error out if there is union all.
-- TEMPORARLY DISABLE UNION ALL
-- SELECT count(*) FROM
-- (
-- (SELECT l_orderkey FROM lineitem_subquery) UNION ALL
-- (SELECT 1::bigint)
--) b;
---
-- TEMPORARLY DISABLE UNIONS WITHOUT JOINS
---
-- Check that we error out if there is non relation subqueries
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION ALL
(SELECT 1::bigint)
) b;
ERROR: cannot push down this subquery
DETAIL: Subqueries without relations are unsupported
-- Check that we error out if queries in union do not include partition columns.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_partkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_partkey FROM lineitem_subquery)
) 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.
--SELECT count(*) FROM
--(
-- (SELECT l_orderkey FROM lineitem_subquery) UNION
-- (SELECT l_orderkey FROM lineitem_subquery)
--) b;
SELECT count(*) FROM
(
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) b;
count
-------
2985
(1 row)
-- Check that we error out if inner query has limit but outer quers has not.
SELECT
avg(o_totalprice/l_quantity)
@ -289,22 +294,32 @@ WHERE
(1 row)
-- Check that if subquery is pulled, we don't error and run query properly.
--SELECT count(*) FROM
--(
--SELECT l_orderkey FROM (
--(SELECT l_orderkey FROM lineitem_subquery) UNION
--(SELECT l_orderkey FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
--SELECT count(*) FROM
--(
--SELECT * FROM (
--(SELECT * FROM lineitem_subquery) UNION
--(SELECT * FROM lineitem_subquery)
--) a
--WHERE l_orderkey = 1
--) b;
SELECT count(*) FROM
(
SELECT l_orderkey FROM (
(SELECT l_orderkey FROM lineitem_subquery) UNION
(SELECT l_orderkey FROM lineitem_subquery)
) a
WHERE l_orderkey = 1
) b;
count
-------
1
(1 row)
SELECT count(*) FROM
(
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 l_orderkey FROM (