Skip to content

Commit 21a2682

Browse files
committed
Light fix pathman_join_clause test
1 parent 777917d commit 21a2682

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

expected/pathman_join_clause.out

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,34 @@ CREATE SCHEMA test;
66
* Test push down a join clause into child nodes of append
77
*/
88
/* create test tables */
9-
CREATE TABLE fk (
9+
CREATE TABLE test.fk (
1010
id1 INT NOT NULL,
1111
id2 INT NOT NULL,
1212
start_key INT,
1313
end_key INT,
1414
PRIMARY KEY (id1, id2));
15-
CREATE TABLE mytbl (
15+
CREATE TABLE test.mytbl (
1616
id1 INT NOT NULL,
1717
id2 INT NOT NULL,
1818
key INT NOT NULL,
19-
CONSTRAINT fk_fk FOREIGN KEY (id1, id2) REFERENCES fk(id1, id2),
19+
CONSTRAINT fk_fk FOREIGN KEY (id1, id2) REFERENCES test.fk(id1, id2),
2020
PRIMARY KEY (id1, key));
21-
SELECT pathman.create_hash_partitions('mytbl', 'id1', 8);
21+
SELECT pathman.create_hash_partitions('test.mytbl', 'id1', 8);
2222
create_hash_partitions
2323
------------------------
2424
8
2525
(1 row)
2626

2727
/* ...fill out with test data */
28-
INSERT INTO fk VALUES (1, 1);
29-
INSERT INTO mytbl VALUES (1, 1, 5), (1,1,6);
28+
INSERT INTO test.fk VALUES (1, 1);
29+
INSERT INTO test.mytbl VALUES (1, 1, 5), (1,1,6);
3030
/* gather statistics on test tables to have deterministic plans */
31-
ANALYZE fk;
32-
ANALYZE mytbl;
31+
ANALYZE test.fk;
32+
ANALYZE test.mytbl;
3333
/* run test queries */
3434
EXPLAIN (COSTS OFF) /* test plan */
3535
SELECT m.tableoid::regclass, id1, id2, key, start_key, end_key
36-
FROM mytbl m JOIN fk USING(id1, id2)
36+
FROM test.mytbl m JOIN test.fk USING(id1, id2)
3737
WHERE NOT key <@ int4range(6, end_key);
3838
QUERY PLAN
3939
------------------------------------------------------------------------------------
@@ -84,14 +84,14 @@ SELECT m.tableoid::regclass, id1, id2, key, start_key, end_key
8484

8585
/* test joint data */
8686
SELECT m.tableoid::regclass, id1, id2, key, start_key, end_key
87-
FROM mytbl m JOIN fk USING(id1, id2)
87+
FROM test.mytbl m JOIN test.fk USING(id1, id2)
8888
WHERE NOT key <@ int4range(6, end_key);
89-
tableoid | id1 | id2 | key | start_key | end_key
90-
----------+-----+-----+-----+-----------+---------
91-
mytbl_6 | 1 | 1 | 5 | |
89+
tableoid | id1 | id2 | key | start_key | end_key
90+
--------------+-----+-----+-----+-----------+---------
91+
test.mytbl_6 | 1 | 1 | 5 | |
9292
(1 row)
9393

9494
DROP SCHEMA test CASCADE;
95+
NOTICE: drop cascades to 10 other objects
9596
DROP EXTENSION pg_pathman CASCADE;
96-
NOTICE: drop cascades to 8 other objects
9797
DROP SCHEMA pathman CASCADE;

sql/pathman_join_clause.sql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,36 +10,36 @@ CREATE SCHEMA test;
1010
*/
1111

1212
/* create test tables */
13-
CREATE TABLE fk (
13+
CREATE TABLE test.fk (
1414
id1 INT NOT NULL,
1515
id2 INT NOT NULL,
1616
start_key INT,
1717
end_key INT,
1818
PRIMARY KEY (id1, id2));
19-
CREATE TABLE mytbl (
19+
CREATE TABLE test.mytbl (
2020
id1 INT NOT NULL,
2121
id2 INT NOT NULL,
2222
key INT NOT NULL,
23-
CONSTRAINT fk_fk FOREIGN KEY (id1, id2) REFERENCES fk(id1, id2),
23+
CONSTRAINT fk_fk FOREIGN KEY (id1, id2) REFERENCES test.fk(id1, id2),
2424
PRIMARY KEY (id1, key));
25-
SELECT pathman.create_hash_partitions('mytbl', 'id1', 8);
25+
SELECT pathman.create_hash_partitions('test.mytbl', 'id1', 8);
2626

2727
/* ...fill out with test data */
28-
INSERT INTO fk VALUES (1, 1);
29-
INSERT INTO mytbl VALUES (1, 1, 5), (1,1,6);
28+
INSERT INTO test.fk VALUES (1, 1);
29+
INSERT INTO test.mytbl VALUES (1, 1, 5), (1,1,6);
3030

3131
/* gather statistics on test tables to have deterministic plans */
32-
ANALYZE fk;
33-
ANALYZE mytbl;
32+
ANALYZE test.fk;
33+
ANALYZE test.mytbl;
3434

3535
/* run test queries */
3636
EXPLAIN (COSTS OFF) /* test plan */
3737
SELECT m.tableoid::regclass, id1, id2, key, start_key, end_key
38-
FROM mytbl m JOIN fk USING(id1, id2)
38+
FROM test.mytbl m JOIN test.fk USING(id1, id2)
3939
WHERE NOT key <@ int4range(6, end_key);
4040
/* test joint data */
4141
SELECT m.tableoid::regclass, id1, id2, key, start_key, end_key
42-
FROM mytbl m JOIN fk USING(id1, id2)
42+
FROM test.mytbl m JOIN test.fk USING(id1, id2)
4343
WHERE NOT key <@ int4range(6, end_key);
4444

4545

0 commit comments

Comments
 (0)