-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Introduce liftable constants to shaper to prepare for precompilation #33351
Conversation
@roji created a separate PR to preserve the original code changes until we are happy with what we have. It's draft so far but should be ok to take a look. |
3378012
to
05cf1e9
Compare
5bd1bd8
to
3a7faf7
Compare
3a7faf7
to
61aa234
Compare
...hapedQueryCompilingExpressionVisitor.CosmosProjectionBindingRemovingExpressionVisitorBase.cs
Outdated
Show resolved
Hide resolved
3548892
to
fed9a36
Compare
src/EFCore.Relational/Query/Internal/RelationalLiftableConstantExpressionDependencies.cs
Outdated
Show resolved
Hide resolved
d708d97
to
339b9af
Compare
dd1cf50
to
487225a
Compare
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
487225a
to
0f61a77
Compare
@ajcvickers specifically for changes in the EntityMaterializerSource and the area around (lazy loading, injectible service, parameter binding etc) |
0f61a77
to
a424b3e
Compare
1d415ae
to
c8a5950
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice to see this coming together! See first review comments.
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
226a7c9
to
8c3691b
Compare
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
src/EFCore.Relational/Query/RelationalQueryCompilationContext.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
// NOTE: this is unreliable way to get type mapping. Only doing this as last resort, hoping to "guess" the right one | ||
typeMappingExpression = liftableConstantFactory.CreateLiftableConstant( | ||
typeMapping, | ||
c => (RelationalTypeMapping)c.Dependencies.TypeMappingSource.FindMapping(type, c.Dependencies.Model, null)!, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing the same lookup for the regular/inline case would at least show us if there's a failing test where this logic isn't correct (this is in general why I prefer we avoid having different paths for regular vs. precompiled as much as possible).
src/EFCore.SqlServer.HierarchyId/Storage/Json/SqlServerJsonHierarchyIdReaderWriter.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to EntityMaterializerSource
seem okay.
828dbf0
to
36bb5a7
Compare
@roji ready for the final peek, I removed all the changes not related to vanilla queries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks almost ready - see remaining comments, I don't think they're blocking if they're problematic (let's discuss if so).
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
...l/Query/RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.cs
Outdated
Show resolved
Hide resolved
@roji updated with the latest feedback - all changes in separate commit for easier review |
f47c305
to
3dcb48c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @maumar!
Take a look at the remaining unresolved comments for final minor cleanup, but otherwise good to go!
3dcb48c
to
7880f1c
Compare
Part of #25009
json reader writer proper fix