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

[6.0-rc2] Query: Translate ToList over grouping element #26054

Merged
merged 2 commits into from
Sep 16, 2021

Conversation

smitpatel
Copy link
Contributor

@smitpatel smitpatel commented Sep 15, 2021

Part 2 & 3 of #26046

Description

  • Query with GroupBy as final operator throws unfriendly error message
  • Query which specifies ToList over grouping element throws translation error or generate incorrect results

Customer Impact
Customer will get exception thrown or incorrect results

How found
Manual testing done by @ajcvickers

Test coverage
Added regression tests for scenario and similar cases.

Regression?

  • Query with GroupBy as final operator throwing unfriendly error message is a regression (we used to throw better message)
  • Query with ToList over grouping element is a new feature in 6.0

Risk

  • Low. Code change is minimal and we have many tests going over same code path.

@smitpatel smitpatel requested a review from a team September 15, 2021 22:17
@@ -1126,15 +1127,15 @@ public void ApplyPredicate(SqlExpression sqlExpression)
/// Applies grouping from given key selector.
/// </summary>
/// <param name="keySelector"> An key selector expression for the GROUP BY. </param>
public Expression ApplyGrouping(Expression keySelector)
public void ApplyGrouping(Expression keySelector)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This API was changed in 6.0, now it goes back to what it was in 5.0

/// </summary>
public void ClearGroupBy()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was new API in 6.0

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

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

🐑 🇮🇹

Base automatically changed from smit/parity to release/6.0 September 16, 2021 00:15
@smitpatel smitpatel force-pushed the smit/parity2 branch 2 times, most recently from 2e86a65 to e8f7083 Compare September 16, 2021 00:17
@smitpatel smitpatel changed the base branch from release/6.0 to release/6.0-rc2 September 16, 2021 00:36
@smitpatel
Copy link
Contributor Author

@Pilchie @dotnet/efteam - This needs to be merged to rc2 branch. Need approval.

This couldn't finish in time because helix/windows builds are timing out.

@ajcvickers
Copy link
Contributor

@smitpatel Please fill out the servicing template above.

@ajcvickers ajcvickers changed the title Query: Translate ToList over grouping element [6.0-rc2] Query: Translate ToList over grouping element Sep 16, 2021
@ajcvickers
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@smitpatel
Copy link
Contributor Author

Filled in template.

@Pilchie
Copy link
Member

Pilchie commented Sep 16, 2021

This introduces RC1 -> RC2 breaking API changes, right? Do we have a communication plan for those?

@smitpatel
Copy link
Contributor Author

The API being changed above are public mainly for providers. No customer should be using it in normal course of action. Further, even with the change, most of the work is done by relational provider itself without providers having to write a code which uses that API. There are only handful of providers which would have upgraded upto rc1 packages at this point. Perhaps we can just tag in the post to communicate?

@ajcvickers
Copy link
Contributor

@smitpatel Can we verify that our major external providers for MySQL (@lauxjpn) and ProsgreSQL (@roji) will not break going from RC1 to RC2? This well help ensure people can quickly adopt RC2 when it goes out.

@smitpatel
Copy link
Contributor Author

MySql doesn't have rc1 package yet.
My github search skills indicated that efcore.pg is not using any of above 2 APIs. @roji can provider better confirmation.

@Pilchie
Copy link
Member

Pilchie commented Sep 16, 2021

Okay, I'll approve based on that. Can we warn the MySQL author that this is coming in case they make an RC1 package between now and when RC2 releases?

@roji
Copy link
Member

roji commented Sep 16, 2021

All OK from my side (efcore.pg).

@smitpatel
Copy link
Contributor Author

@lauxjpn - If you are releasing package for rc1, please let me know if you need to use any of the API above. I can provide a work-around. (perhaps add them in future release if they are needed by providers).

@smitpatel smitpatel merged commit 45d0ce1 into release/6.0-rc2 Sep 16, 2021
@smitpatel smitpatel deleted the smit/parity2 branch September 16, 2021 22:42
@lauxjpn
Copy link
Contributor

lauxjpn commented Sep 22, 2021

@lauxjpn - If you are releasing package for rc1, please let me know if you need to use any of the API above. I can provide a work-around. (perhaps add them in future release if they are needed by providers).

@smitpatel Thanks, should not be an issue for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants