Skip to content

Commit

Permalink
Remove duplicate test case after syncing
Browse files Browse the repository at this point in the history
the same patch from upstream

Own patch: dfd53de
Upstream patch: edbc723
  • Loading branch information
Stolb27 committed Apr 27, 2022
1 parent 2dc76c5 commit 29e1e35
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 137 deletions.
51 changes: 0 additions & 51 deletions src/test/regress/expected/gporca.out
Original file line number Diff line number Diff line change
Expand Up @@ -14258,57 +14258,6 @@ SELECT gp_segment_id, * FROM result_tab;
DROP TABLE IF EXISTS dist_tab_a;
DROP TABLE IF EXISTS dist_tab_b;
DROP TABLE IF EXISTS result_tab;
-- Test ORCA not falling back to Postgres planner during
-- SimplifySelectOnOuterJoin stage. Previously, we could get assertion error
-- trying to EberEvaluate() strict function with zero arguments.
-- Postgres planner will fold our function, because it has additional
-- eval_const_expressions() call for subplan. ORCA has only one call to
-- fold_constants() at the very beginning and doesn't perform folding later.
CREATE TABLE join_null_rej1(i int);
CREATE TABLE join_null_rej2(i int);
INSERT INTO join_null_rej1(i) VALUES (1), (2), (3);
INSERT INTO join_null_rej2 SELECT i FROM join_null_rej1;
CREATE OR REPLACE FUNCTION join_null_rej_func() RETURNS int AS $$
BEGIN
RETURN 5;
END;
$$ LANGUAGE plpgsql STABLE STRICT;
EXPLAIN (COSTS OFF) SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);
QUERY PLAN
---------------------------------------------------------------------
Result
InitPlan 1 (returns $0) (slice2)
-> Aggregate
-> Gather Motion 3:1 (slice1; segments: 3)
-> Aggregate
-> Hash Join
Hash Cond: (t1.i = t2.i)
-> Seq Scan on join_null_rej1 t1
Filter: (i < 5)
-> Hash
-> Seq Scan on join_null_rej2 t2
Filter: (i < 5)
Optimizer: Postgres query optimizer
(13 rows)

-- Optional, but let's check we get same result for both, folded and
-- not folded now() frunction.
SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);
cnt
-----
3
(1 row)

-- Test if orca produces bitmap scan on mixed partitions
create table mixed_part( a int) distributed randomly
partition by range (a)
Expand Down
53 changes: 0 additions & 53 deletions src/test/regress/expected/gporca_optimizer.out
Original file line number Diff line number Diff line change
Expand Up @@ -14520,59 +14520,6 @@ SELECT gp_segment_id, * FROM result_tab;
DROP TABLE IF EXISTS dist_tab_a;
DROP TABLE IF EXISTS dist_tab_b;
DROP TABLE IF EXISTS result_tab;
-- Test ORCA not falling back to Postgres planner during
-- SimplifySelectOnOuterJoin stage. Previously, we could get assertion error
-- trying to EberEvaluate() strict function with zero arguments.
-- Postgres planner will fold our function, because it has additional
-- eval_const_expressions() call for subplan. ORCA has only one call to
-- fold_constants() at the very beginning and doesn't perform folding later.
CREATE TABLE join_null_rej1(i int);
CREATE TABLE join_null_rej2(i int);
INSERT INTO join_null_rej1(i) VALUES (1), (2), (3);
INSERT INTO join_null_rej2 SELECT i FROM join_null_rej1;
CREATE OR REPLACE FUNCTION join_null_rej_func() RETURNS int AS $$
BEGIN
RETURN 5;
END;
$$ LANGUAGE plpgsql STABLE STRICT;
EXPLAIN (COSTS OFF) SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);
QUERY PLAN
----------------------------------------------------------------------------------------
Result
-> Result
-> Nested Loop Left Join
Join Filter: true
-> Result
-> Aggregate
-> Materialize
-> Gather Motion 3:1 (slice1; segments: 3)
-> Hash Join
Hash Cond: (join_null_rej1.i = join_null_rej2.i)
-> Seq Scan on join_null_rej1
-> Hash
-> Seq Scan on join_null_rej2
Filter: (i < join_null_rej_func())
Optimizer: Pivotal Optimizer (GPORCA)
(15 rows)

-- Optional, but let's check we get same result for both, folded and
-- not folded now() frunction.
SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);
cnt
-----
3
(1 row)

-- Test if orca produces bitmap scan on mixed partitions
create table mixed_part( a int) distributed randomly
partition by range (a)
Expand Down
33 changes: 0 additions & 33 deletions src/test/regress/sql/gporca.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3213,39 +3213,6 @@ DROP TABLE IF EXISTS dist_tab_a;
DROP TABLE IF EXISTS dist_tab_b;
DROP TABLE IF EXISTS result_tab;

-- Test ORCA not falling back to Postgres planner during
-- SimplifySelectOnOuterJoin stage. Previously, we could get assertion error
-- trying to EberEvaluate() strict function with zero arguments.
-- Postgres planner will fold our function, because it has additional
-- eval_const_expressions() call for subplan. ORCA has only one call to
-- fold_constants() at the very beginning and doesn't perform folding later.
CREATE TABLE join_null_rej1(i int);
CREATE TABLE join_null_rej2(i int);

INSERT INTO join_null_rej1(i) VALUES (1), (2), (3);
INSERT INTO join_null_rej2 SELECT i FROM join_null_rej1;

CREATE OR REPLACE FUNCTION join_null_rej_func() RETURNS int AS $$
BEGIN
RETURN 5;
END;
$$ LANGUAGE plpgsql STABLE STRICT;

EXPLAIN (COSTS OFF) SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);
-- Optional, but let's check we get same result for both, folded and
-- not folded now() frunction.
SELECT (
SELECT count(*) cnt
FROM join_null_rej1 t1
LEFT JOIN join_null_rej2 t2 ON t1.i = t2.i
WHERE t2.i < join_null_rej_func()
);

-- Test if orca produces bitmap scan on mixed partitions
create table mixed_part( a int) distributed randomly
partition by range (a)
Expand Down

0 comments on commit 29e1e35

Please sign in to comment.