Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELECT DISTINCT tests #331

Merged
merged 5 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/regress/tests/router/expected/shard_routing.out
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,17 @@ NOTICE: send query to shard(s) : sh2
-211212 | 2121221 | 21
(9 rows)

SELECT DISTINCT * FROM xxtt1 WHERE w_id=21;
NOTICE: send query to shard(s) : sh2
i | j | w_id
---------+---------+------
-211212 | 2121221 | 21
12 | | 21
21 | | 21
2121221 | | 21
| | 21
(5 rows)

-- check that aliases works
SELECT * FROM xxtt1 a WHERE a.w_id >= 1;
NOTICE: send query to shard(s) : sh1
Expand Down
1 change: 1 addition & 0 deletions test/regress/tests/router/sql/shard_routing.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ INSERT INTO xxtt1 (j, i, w_id) VALUES(2121221, -211212, 21);
SELECT * FROM xxtt1 WHERE w_id >= 1;
SELECT * FROM xxtt1 WHERE w_id >= 20;
SELECT * FROM xxtt1 WHERE w_id >= 21;
SELECT DISTINCT * FROM xxtt1 WHERE w_id=21;

-- check that aliases works
SELECT * FROM xxtt1 a WHERE a.w_id >= 1;
Expand Down
Loading