Repository navigation
Query: Improvements to Relational GroupBy translation for composition - #11222
Merged
Merged
Conversation
smitpatel
force-pushed
the
smit/groupbystreamlined
branch
from
March 13, 2018 23:09
76df74f to
b95111c
Compare
Contributor
Author
|
Ping! |
anpete
reviewed
Mar 13, 2018
| /// <value> | ||
| /// The predicate. | ||
| /// </value> | ||
| public virtual Expression HavingExpression { get; [param: CanBeNull] set; } |
smitpatel
force-pushed
the
smit/groupbystreamlined
branch
from
March 14, 2018 01:27
b95111c to
2a1c7b1
Compare
Contributor
Author
|
Updated to translate group by constant/parameter. Ready for review. |
smitpatel
force-pushed
the
smit/groupbystreamlined
branch
from
March 14, 2018 01:31
2a1c7b1 to
e8ca357
Compare
bricelam
reviewed
Mar 14, 2018
| @"SELECT [o].[CustomerID] AS [Key], COUNT(*) AS [Count] | ||
| FROM [Orders] AS [o] | ||
| GROUP BY [o].[CustomerID] | ||
| HAVING COUNT(*) > 4"); |
anpete
reviewed
Mar 14, 2018
| return translatedKey; | ||
| } | ||
|
|
||
| goto default; |
Contributor
There was a problem hiding this comment.
Can the default block be moved after the switch?
Contributor
Author
There was a problem hiding this comment.
Yes. Would it matter though?
Contributor
There was a problem hiding this comment.
Code would be more standard. n-dev problem ![]()
anpete
reviewed
Mar 14, 2018
| private Expression TryBindQuerySourcePropertyExpression(MemberExpression memberExpression) | ||
| { | ||
| if (memberExpression.Expression is QuerySourceReferenceExpression qsre) | ||
| if (!(memberExpression.Expression is QuerySourceReferenceExpression qsre)) |
Contributor
Author
There was a problem hiding this comment.
Flipping condition wouldn't avoid nesting. First if block retrieves the QSRE in multiple cases. Second if block uses QSRE to find the translation.
anpete
approved these changes
Mar 14, 2018
smitpatel
force-pushed
the
smit/groupbystreamlined
branch
from
March 14, 2018 17:25
e8ca357 to
6cf774e
Compare
- Add support for translating OrderBy after GroupBy operator - Add support for `HAVING` clause in SQL which would be generated when translating predicate after GroupByAggregate Resolves #10870 - Make sure client eval warning is not issued when translating GroupByAggregate Resolves #11157 - GroupBy Aggregate works when element/result selector is DTO instead of anonymous type Resolves #11176 (KeySelector has to be client evaluated) - Make sure that SQL added to GROUP BY clause is not aliased Resolves #11218 - Translate GroupBy Constant/Parameter with aggregates Resolves #9969 Part of #10012 Part of #2341
smitpatel
force-pushed
the
smit/groupbystreamlined
branch
from
March 14, 2018 17:26
6cf774e to
5b6e178
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Query: Improvements to Relational GroupBy translation for composition
HAVINGclause in SQL which would be generated when translating predicate after GroupByAggregate Resolves Query: GroupBy with Where produces invalid SQL #10870Part of #10012
Part of #2341