Repository navigation
Conversation
|
Hi @tuespetre, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
eee3d0b to
5f98d64
Compare
|
There you go @langdonx, multi-part/complex/nested key support |
|
@tuespetre - If fix for certain issues are isolated and not required/related to group by translation then please create different PR. Multiple unrelated changes in same PR makes it harder to review. |
|
@smitpatel sorry, I know it's a large PR. Everything ended up being extremely intertwined, a total domino effect. |
7bd42cd to
a3b2caa
Compare
|
@smitpatel I squashed the commits again and amended the notes. I've also just rebased onto upstream/dev with @maumar's changes from the weekend and am running tests before pushing up again. |
a3b2caa to
a3e5efc
Compare
|
Okay, I've finished rebasing and pushed. |
c5e0555 to
5652a69
Compare
|
I've just pushed again, this time to add and uncomment some GroupBy tests. At this point I'm going to wait for feedback (except to rebase periodically if I don't hear anything.) |
5652a69 to
52561bd
Compare
|
I've rebased to account for the changes merged into dev for commit b8fb258. |
|
@tuespetre please try to break this PR into smaller components. In it's current form this PR is simply too big and too risky for us to take. (e.g. if one part of the fix regresses some behavior, we don't want to be looking for the culprit among the 100 changed files). I would suggest trying to separate the small bug fixes first (e.g. fix to #7523) as well as the small refactorings you made (e.g. properly implementing VisitChildren on some of the Expressions). It should also be possible to separate GroupJoin optimization (i.e. avoid unnecessary materialization) from the rest - we have a prototype of similar change which is fairly isolated (although 15 tests or so are still broken in it, so I might be wrong :) ) Moreover, breaking the PR to components would make it easier for you to perform the rebase - there are some decent size PRs coming from our end. |
37e0558 to
fcba9de
Compare
d8b10a1 to
afc00fc
Compare
afc00fc to
96879ee
Compare
|
@smitpatel @maumar rebased again; also nitpicked through for any noisy pointless changes (added line breaks, methods shifted around, variable names, etc.) that I could find to clean them up. From ~100 files changed down to 70 now. It's getting down to the parts that are truly interdependent and cannot be easily split up (if at all.) The main components remaining:
I will look for any remaining opportunities I can find to split out other things, but I have tried tackling it a few different ways already and it gets to be impossible (apart from shaving off all of the |
|
@tuespetre - What are the issues addressed in this PR? |
Implementing I can't explain exactly and concisely how it is related other than saying that I've tried to separate the changes and I'm just about at the point where there's nothing left to separate, other than submitting a new PR that has all of the materialization optimizations and leaving this PR to contain only the |
|
EDIT: son of a 🐩 I did not mean to do that |
|
Hi @tuespetre, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution! The agreement was validated by .NET Foundation and real humans are currently evaluating your PR. TTYL, DNFBOT; |
|
@tuespetre I think separating GroupJoin materialization optimization is the right call here. Those are both really big features and I think that their combined complexity is still too risky for us to consider. Good examples of such small incremental improvements would be #7647 and #7648. |
|
I wish it were simpler to make incremental changes for this but once the 'query sources requiring materialization' is changed, there is a LOT of stuff that has to change. I've split off a branch for just the materialization changes (the tests are finishing up locally right now, I will push it soon) and it still has 66 affected files. |
|
The way I was thinking about it was to start with only fixing cases where we don't produce client side GroupJoin. This makes it so that you don't need to tinker with with implementation of client _GroupJoin method and still provides significant value |
|
It's not going so well on #7663 (trying to remove the caching and still getting everything to pass.) I don't think I'm going to be able to invest much more of my time into all of these optimizations I've worked on 😞 I know the initial changes were big and 'risky' and stuff. I started out targeting GROUP BY and just in getting that to work I made all of the other improvements. That's why splitting it apart is hard, I took a problem by the horns and really went to town on it, I didn't go the other way around and solve little problem by little problem and wait for some day to come when all of the other stuff was out of the way so that it would be 'easy' to implement GROUP BY. But hey, all the tests passed and I think I added a lot of value (if performance is a feature.) But this is going on 3 weeks of trying to split out small components not to mention the month of work I put into it before that. Too many other things that need to get done, I'm afraid. Sorry @smitpatel, @maumar, @anpete, @divega |
|
Oh, no! This is really sad news. :( As it stands, EF Core is a no go for me because doing any sort of aggregate querying performs terribly on datasets with more than a few hundred records. This feature is the only thing standing in the way of me being able to go serverless on AWS. Assuming there is good test coverage to begin with, if all existing tests pass, is it really that risky? If the tests aren't extensive, the sooner a PR like this gets merged, the more likely issues will be found and corrected before the next major release. |
|
@tuespetre I'm sorry that the things didn't work out better with this PR. There are a lot of good ideas here and it should be very useful once we begin to tackle this issue (will make sure to give you credit where credit is due). There will always be a problem with big PRs like this, as it's so much harder for us to understand all the ramifications if we haven't done the legwork ourselves. That's why we were pushing so hard to break this apart (I can imagine how frustrating it must have felt on your end). Breaking it apart really was critical to us as it makes it much easier for us to grok and make the risk acceptable. Also easier to revert and/or fix a more isolated change if we find a bug in it in the future. I wish we were bit more responsive and also that the timing was better (i.e. we would not have had a couple of big PRs in the works at the same time). However, I'm glad that you managed to get some of those smaller PRs in, so hopefully the whole experience doesn't feel like a complete waste of time from your perspective (it certainly doesn't feel like that to us). |
|
@langdonx We are afraid what impact such a big change could have on our long-term maintainability. We have a few sizable PRs in similar area (one of them is a rework of our eager loading, for instance). Some of those big changes would have to go on top of this PR. If we find some small bugs in it we could easily fix it for sure, but if there is a fundamental problem somewhere, it could be a real nightmare for us going forward. |
|
@MauMaur thank you, I do have one last idea of something I may be able to offer up out of this pile of code |
Okay, please don't be mad at me -- I'm feeling kind 👨🍳 of scrambled after my deep dive into this. It's a pretty big PR and touches a lot of things. I didn't plan on it being this way but as I was working on my initial goal (getting
GROUP BYto work) I ended up breaking some things, and in order to fix them, other things broke, and I had to fix them, ad nauseum.Now I've finally got the tests all passing (save for one SQLite oddity, but I will cover that in a sec) and successfully rebased onto the last month's worth of commits.
The gist of what I've done:
GROUP BYsupportLEFT JOIN LATERAL/OUTER APPLYsupportNow, there are several points I know still need to be covered:
GroupBykeysQueryFlattenerclass and its factory could disappear, it's only used for one call nowGROUP BY...I just thought that for as long as this has already taken, and for as large of a changeset as this is, I would get some kind of ball rolling here.