-
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
Query: Add TableReferenceExpression as a bridge to ColumnExpression for referential integrity #24458
Conversation
48b9bc3
to
f801da6
Compare
f801da6
to
1d2cd44
Compare
7ba85c7
to
fb3c5b8
Compare
<data name="UnableToTranslateSubqueryWithDistinct" xml:space="preserve"> | ||
<value>Subquery with 'Distinct' can only be translated if projection consists only of entities and their properties, or it contains keys of all entities required to generate results on the client side. Either add '{column}' to the projection, remove complex elements of the projection, or rewrite the query to not use the 'Distinct' operation.</value> | ||
</data> | ||
<data name="UnableToTranslateSubqueryWithGroupBy" xml:space="preserve"> |
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.
since these are gone, we should probably also update message for InsufficientInformationToIdentifyOuterElementOfCollectionJoin
92a1b91
to
cd7cf7e
Compare
dd7277f
to
6e46d5f
Compare
…or referential integrity - Add TableReferenceExpression - SelectExpression contains tableReferenceExpression for each table added - TableReferenceExpression can identify the table by querying the selectExpression - During pushdown and set operation we update the table references as the selectExpression where columns belong is changing - Whenever adding something to selectExpression, we assign unique alises if there is nested selectExpression - Improve identifier detection for Distinct/GroupBy cases - Pushdown internally gives a visitor to update the expression being added in terms of new column expressions - Copy proper identifiers when applying set operation - Make dictionary being passed around in query IReadOnlyDictionary - Move entityProjectionCache from QueryExpression to ProjectionBindingExpressionVisitor as it is not an internal state for QueryExpression. It existing only in the context of applying particular projection mapping once. - Remove TableAliasUniquifyingExpressionVisitor, added debug only (currently disabled) TableAliasVerifyingExpressionVisitor which verifies that all alises are unique and used in order. Resolves #17337
6e46d5f
to
247ce69
Compare
Why not to make TableReferenceExpression and ColumnExpression classes public? After these changes EfCore.SqlServer2008Query package could not translate queries as it was worked in fifth version. |
|
Sorry, I meant ConcreteColumnExpression. ColumnExpression, used before introducing ConcreteColumnExpression, is public. |
Notes same as |
Part of #17337