Introduce liftable constants to shaper to prepare for precompilation#33351
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
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
roji
left a comment
There was a problem hiding this comment.
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.
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
ajcvickers
left a comment
There was a problem hiding this comment.
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 |
roji
left a comment
There was a problem hiding this comment.
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
3dcb48c to
7880f1c
Compare
Part of #25009
json reader writer proper fix