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

Query: Translate Distinct operator over group element before aggregate #21921

Merged
merged 1 commit into from
Aug 4, 2020

Conversation

smitpatel
Copy link
Member

Resolves #17376

@smitpatel smitpatel requested a review from a team August 3, 2020 21:22
@smitpatel smitpatel force-pushed the smit/distinct branch 2 times, most recently from de67a91 to ad6ba79 Compare August 3, 2020 22:05
Base automatically changed from smit/groupbywhere to main August 3, 2020 23:33
await base.GroupBy_group_Where_Select_Distinct_aggregate(async);

AssertSql(
@"SELECT [o].[CustomerID] AS [Key], MAX(DISTINCT (CASE
Copy link
Contributor

Choose a reason for hiding this comment

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

in the future, we can optimize out DISTINCT inside MIN/MAX

@smitpatel smitpatel merged commit 63dd75c into main Aug 4, 2020
@smitpatel smitpatel deleted the smit/distinct branch August 4, 2020 02:25
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.

Aggregate function distinct count throw InvalidOperationException
2 participants