You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Update type mapping/converters to make translation data available for query generation #15979
This should also describe the equality guarantees of a type mapping, and make those guarantees available to query optimizations. A virtual capability on CoreTypeMapping is one possible design; the exact API and ownership need design discussion.
The contract must distinguish:
Agreement between server equality and client equality.
The stronger guarantee needed for substitution: server-equal values cannot be distinguished by the operations across which the rewrite substitutes them.
These are not equivalent. DateTimeOffset.Equals itself ignores the offset when comparing instants, while .Hour can distinguish those values. Existing Comparer, KeyComparer, and ProviderValueComparer APIs specify client-side comparisons; their presence or default implementation does not prove a server-side substitution is safe.
Use the grouping-key aggregate lift as an initial consumer (HasIdentityEquality in NavigationExpandingExpressionVisitor.cs), with provider-specific coverage for safe mappings and rejected shapes. The goal is to enable safe optimizations, not to change normal database comparison semantics or implement general conversion-aware member translation.
Activity
AndriySvyryd commentedon Nov 15, 2026
This should also describe the equality guarantees of a type mapping, and make those guarantees available to query optimizations. A virtual capability on
CoreTypeMappingis one possible design; the exact API and ownership need design discussion.The contract must distinguish:
Agreement between server equality and client equality.
The stronger guarantee needed for substitution: server-equal values cannot be distinguished by the operations across which the rewrite substitutes them.
These are not equivalent.
DateTimeOffset.Equalsitself ignores the offset when comparing instants, while.Hourcan distinguish those values. ExistingComparer,KeyComparer, andProviderValueComparerAPIs specify client-side comparisons; their presence or default implementation does not prove a server-side substitution is safe.Use the grouping-key aggregate lift as an initial consumer (
HasIdentityEqualityin NavigationExpandingExpressionVisitor.cs), with provider-specific coverage for safe mappings and rejected shapes. The goal is to enable safe optimizations, not to change normal database comparison semantics or implement general conversion-aware member translation.