Skip to content

Added DISTINCT ON handling#2181

Merged
Hydrocharged merged 1 commit intomainfrom
daylon/distinct-on
Jan 10, 2026
Merged

Added DISTINCT ON handling#2181
Hydrocharged merged 1 commit intomainfrom
daylon/distinct-on

Conversation

@Hydrocharged
Copy link
Copy Markdown
Collaborator

@Hydrocharged Hydrocharged commented Jan 8, 2026

@Hydrocharged Hydrocharged requested a review from zachmu January 8, 2026 12:48
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

Main PR
covering_index_scan_postgres 538.10/s 540.06/s +0.3%
index_join_postgres 113.67/s 116.61/s +2.5%
index_join_scan_postgres 174.62/s 173.66/s -0.6%
index_scan_postgres 11.07/s 11.02/s -0.5%
oltp_point_select 2201.05/s 2214.75/s +0.6%
oltp_read_only 1661.64/s 1648.32/s -0.9%
select_random_points 104.33/s 102.01/s -2.3%
select_random_ranges 414.80/s 395.59/s -4.7%
table_scan_postgres 10.67/s 10.91/s +2.2%
types_table_scan_postgres 4.94/s 4.96/s +0.4%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 8, 2026

Main PR
Total 42090 42090
Successful 17514 17518
Failures 24576 24572
Partial Successes1 5587 5587
Main PR
Successful 41.6108% 41.6203%
Failures 58.3892% 58.3797%

${\color{lightgreen}Progressions (4)}$

subselect

QUERY: SELECT * FROM foo WHERE id IN
    (SELECT id2 FROM (SELECT DISTINCT ON (id2) id1, id2 FROM bar) AS s);

tsrf

QUERY: SELECT DISTINCT ON (a) a, b, generate_series(1,3) g
FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b)
ORDER BY a, b DESC;
QUERY: SELECT DISTINCT ON (a) a, b, generate_series(1,3) g
FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b)
ORDER BY a, b DESC, g DESC;
QUERY: SELECT DISTINCT ON (a, b, g) a, b, generate_series(1,3) g
FROM (VALUES (3, 2), (3,1), (1,1), (1,4), (5,3), (5,1)) AS t(a, b)
ORDER BY a, b DESC, g DESC;

Footnotes

  1. These are tests that we're marking as Successful, however they do not match the expected output in some way. This is due to small differences, such as different wording on the error messages, or the column names being incorrect while the data itself is correct.

Copy link
Copy Markdown
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but see comments in GMS

@Hydrocharged Hydrocharged force-pushed the daylon/distinct-on branch 2 times, most recently from bce0f45 to d9dbc4b Compare January 9, 2026 13:00
@Hydrocharged
Copy link
Copy Markdown
Collaborator Author

Hydrocharged commented Jan 9, 2026

Upon updating GMS to the newest version, I now need

to pass before I can merge as it changes interfaces. Once that's in, I'll merge with main then merge this in.

@Hydrocharged Hydrocharged force-pushed the daylon/distinct-on branch 2 times, most recently from 6146ba9 to bcf164f Compare January 9, 2026 23:40
@Hydrocharged Hydrocharged disabled auto-merge January 10, 2026 01:40
@Hydrocharged Hydrocharged merged commit 5dd2153 into main Jan 10, 2026
17 checks passed
@Hydrocharged Hydrocharged deleted the daylon/distinct-on branch January 10, 2026 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants