Skip to content

Optimize query sources requiring materialization - #7650

Closed
tuespetre wants to merge 1 commit into
dotnet:devfrom
tuespetre:materialization-optimizations
Closed

tuespetre wants to merge 1 commit into
dotnet:devfrom
tuespetre:materialization-optimizations

Conversation

@tuespetre

Copy link
Copy Markdown
Contributor

This is the big one, split out from #7543. There a couple/few other open PRs that, if merged, could somewhat reduce the size of this one, but other than that, I have tried multiple times to break this one down further with no success.

@dnfclas

dnfclas commented Feb 17, 2017

Copy link
Copy Markdown

Hi @tuespetre, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@tuespetre tuespetre changed the title Optimize query sources requirining materialization Optimize query sources requiring materialization Feb 17, 2017
@tuespetre
tuespetre force-pushed the materialization-optimizations branch from e4163f8 to e34c60b Compare February 17, 2017 22:05
@smitpatel

Copy link
Copy Markdown
Contributor

@tuespetre - Can you mention other PRs which are included in this PR so we can review them first which makes it easier to review this one.

Also, given description of the PR, this should optimize the materialization in group join only. If there are any other optimizations which are not related to join/groupjoin then please split them out. There is no reason for them to be inter-dependent. They can certainly improve the groupjoin queries but the mail crux of the issue in groupjoin is forced materialization of both the sides and in this scope of PR, it should be removing that part and apply good heuristic to determine what to materialize and how to bind.

@tuespetre

tuespetre commented Feb 18, 2017 •

Copy link
Copy Markdown
Contributor Author

@smitpatel

Here are the other PRs I would be waiting on that this can be rebased onto:

As for your request:

If there are any other optimizations which are not related to join/groupjoin then please split them out. There is no reason for them to be inter-dependent.

There is plenty of reason for the remaining changes to be interdependent, because changing the heuristics of which query sources require materialization ultimately affects a lot of stuff -- that's what remains in this PR. It starts with the RequiresMaterializationExpressionVisitor, which I very tediously refactored and debugged to properly account for all types of query sources. From there, through debugging and fixing the tests that broke as a result, the other changes resulted.

What remains in this PR should be exactly what you asked for just above: "apply good heuristic to determine what to materialize and how to bind."

@smitpatel smitpatel self-assigned this Feb 18, 2017
@tuespetre

Copy link
Copy Markdown
Contributor Author

@smitpatel what does 'blocked' mean in this case?

@tuespetre

Copy link
Copy Markdown
Contributor Author

@smitpatel @maumar @anpete @rowanmiller

I'm feeling worried by the 'blocked' tag sans explanation. If I need to stop trying here I would like to know now rather than later.

@maumar

maumar commented Feb 18, 2017

Copy link
Copy Markdown
Contributor

@tuespetre I think @smitpatel means that we should review the other pull requests that you mentioned before tackling this one. Basically to make this as simple as possible.

@tuespetre

Copy link
Copy Markdown
Contributor Author

OK, sorry, it just looked 👻 scary to me

@maumar

maumar commented Feb 18, 2017

Copy link
Copy Markdown
Contributor

No worries you are not the first person who got spooked by some of our tags, and surely not the last :)

@tuespetre
tuespetre force-pushed the materialization-optimizations branch 2 times, most recently from f534928 to 4e03579 Compare February 19, 2017 23:12
@tuespetre

Copy link
Copy Markdown
Contributor Author

Rebased + cleaned some 'churn' out of this commit, including removing CompositeExpression

@tuespetre
tuespetre force-pushed the materialization-optimizations branch from 4e03579 to 8759e94 Compare February 19, 2017 23:15
@tuespetre

Copy link
Copy Markdown
Contributor Author

Good news @smitpatel and @maumar... I think I did find another thing I can split out (the OuterPropertyExpression and its related changes.) Looks like it will have some optimizations, assuming I can successfully split it out easily.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants