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: Skip constants in GROUP BY #17114

Merged
merged 3 commits into from
Aug 15, 2019

Conversation

kosinsky
Copy link
Contributor

@kosinsky kosinsky commented Aug 12, 2019

  • The code builds and tests pass (verified by our automated build checks)
  • Commit messages follow this format

If Linq expression uses constants in GroupBy skip these constants in SQL GROUP BY to avoid "Each GROUP BY expression must contain at least one column that is not an outer reference" SQL exception.

Fixes #14152

@kosinsky kosinsky marked this pull request as ready for review August 13, 2019 00:05
@smitpatel
Copy link
Member

This is not the correct way to solve this.

@kosinsky
Copy link
Contributor Author

kosinsky commented Aug 13, 2019

OK, I did more diggin and found that I could achieve the same goal by not adding constant in SelectExpression.GroupBy collection in first place. Am I on right track or I should go even higher upstream?

I've updated PR to show that approach.

@smitpatel smitpatel merged commit f13ae3b into dotnet:release/3.0 Aug 15, 2019
@smitpatel
Copy link
Member

@kosinsky - Thank you for contribution. The 2nd approach seemed more appropriate.

@kosinsky kosinsky deleted the features/ODataStyleGroupBy branch August 15, 2019 21:02
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.

Support for GroupBy key with nested structure for ODATA
2 participants