Skip to content

Add CountDistinct finisher - #1478

Open
ChrisJr404 wants to merge 1 commit into
aarondl:masterfrom
ChrisJr404:count-distinct-finisher
Open

Add CountDistinct finisher#1478
ChrisJr404 wants to merge 1 commit into
aarondl:masterfrom
ChrisJr404:count-distinct-finisher

Conversation

@ChrisJr404

Copy link
Copy Markdown

Closes #1386.

Adds a CountDistinct finisher next to the existing Count, so you can run COUNT(DISTINCT column) without dropping down to a raw query.

The query builder already supports combining count with a distinct expression (it renders COUNT(DISTINCT (col))), so the generated method just sets select/count/distinct and scans the result. It also generates the usual G/GP/P variants and a test that mirrors the existing Count test.

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.

Gen shortcut for COUNT(DISTINCT column_name)

1 participant