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 aggregate functions to server only if not on subquery #7694

Merged
merged 1 commit into from
Feb 24, 2017

Conversation

smitpatel
Copy link
Contributor

Fixes #3792
Aggregate over subquery generates invalid sql. For Max/Min/Average/Sum if the inner projection is a subquery (aka selectexpresion) then we force client eval.

var nonNullableInputType = inputType.UnwrapNullableType();
if (nonNullableInputType == typeof(int)
|| nonNullableInputType == typeof(long))
if (!(expression is SelectExpression))
Copy link
Contributor

Choose a reason for hiding this comment

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

Does expression need RemoveConvert?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly. will update.

@smitpatel smitpatel merged commit dcde6b1 into dev Feb 24, 2017
@smitpatel smitpatel deleted the sumoversubquery3792 branch February 24, 2017 22:33
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.

3 participants