Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21a2682

Browse files
committed
Light fix pathman_join_clause test
1 parent777917d commit21a2682

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 TABLEtest.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 TABLEtest.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) REFERENCEStest.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 INTOtest.fk VALUES (1, 1);
29+
INSERT INTOtest.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+
ANALYZEtest.fk;
32+
ANALYZEtest.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+
FROMtest.mytbl m JOINtest.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+
FROMtest.mytbl m JOINtest.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-
CREATETABLEfk (
13+
CREATETABLEtest.fk (
1414
id1INTNOT NULL,
1515
id2INTNOT NULL,
1616
start_keyINT,
1717
end_keyINT,
1818
PRIMARY KEY (id1, id2));
19-
CREATETABLEmytbl (
19+
CREATETABLEtest.mytbl (
2020
id1INTNOT NULL,
2121
id2INTNOT NULL,
2222
keyINTNOT NULL,
23-
CONSTRAINT fk_fkFOREIGN KEY (id1, id2)REFERENCES fk(id1, id2),
23+
CONSTRAINT fk_fkFOREIGN KEY (id1, id2)REFERENCEStest.fk(id1, id2),
2424
PRIMARY KEY (id1, key));
25-
SELECTpathman.create_hash_partitions('mytbl','id1',8);
25+
SELECTpathman.create_hash_partitions('test.mytbl','id1',8);
2626

2727
/* ...fill out with test data*/
28-
INSERT INTO fkVALUES (1,1);
29-
INSERT INTO mytblVALUES (1,1,5), (1,1,6);
28+
INSERT INTOtest.fkVALUES (1,1);
29+
INSERT INTOtest.mytblVALUES (1,1,5), (1,1,6);
3030

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

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

4545

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp