Skip to content

Commit

Permalink
SELECT DISTINCT tests (#331)
Browse files Browse the repository at this point in the history
* Add test t distinct

* fix regress

* change test

* correction

* correction
  • Loading branch information
CBists committed Dec 4, 2023
1 parent aeb8ef5 commit 54ca79c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
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

0 comments on commit 54ca79c

Please sign in to comment.