-
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
Nav expansion visitor does not visit the Contains item argument #32217
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
regression
Servicing-approved
type-bug
Milestone
Comments
Note: #32291 was filed by a user, showing a regression because of this bug. Visiting the item in ProcessContains fixes the problem (#32291 (comment)). |
maumar
added a commit
that referenced
this issue
Nov 15, 2023
…m argument (and possibly other non-lambda arguments) This was always a problem but was uncovered by change in how we process Contains. We were going through the full process of nav expansion on the argument (only on the source), which could lead to untranslatable expression tree in some cases. Fixes #32217
roji
changed the title
Nav expansion visitor does not visit the Contains item argument (and possibly other non-lambda arguments)
Nav expansion visitor does not visit the Contains item argument
Nov 15, 2023
maumar
added a commit
that referenced
this issue
Nov 16, 2023
…m argument (and possibly other non-lambda arguments) This was always a problem but was uncovered by change in how we process Contains. We were going through the full process of nav expansion on the argument (only on the source), which could lead to untranslatable expression tree in some cases. Fixes #32217 Fixes #32312
maumar
added a commit
that referenced
this issue
Nov 16, 2023
…m argument (and possibly other non-lambda arguments) This was always a problem but was uncovered by change in how we process Contains. We were going through the full process of nav expansion on the argument (only on the source), which could lead to untranslatable expression tree in some cases. Fixes #32217 Fixes #32312
maumar
added a commit
that referenced
this issue
Nov 16, 2023
…m argument (and possibly other non-lambda arguments) This was always a problem but was uncovered by change in how we process Contains. We were going through the full process of nav expansion on the argument (only on the source), which could lead to untranslatable expression tree in some cases. Fixes #32217 Fixes #32312
ajcvickers
added
Servicing-approved
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
and removed
Servicing-consider
labels
Nov 17, 2023
This was referenced Nov 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-query
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
regression
Servicing-approved
type-bug
Note: this issue tracks only fixing Contains. Other non-lambda operators (Skip, Take, ElementAt...) are tracked by #32312, to have two quirks for Contains and non-Contains.
When running test Nested_contains_with_Lists_and_no_inferred_type_mapping (introduced in #32214), which has the following code:
... the query tree going into nav expansion is:
... whereas the tree coming out is:
Note that the outer AsQueryable (over
__strings_0
) is gone, while the inner one (over__ints_1
) remains.What's happening here is this... NavigationExpandingEV works recursively on lambda arguments of operators; ProcessWhere calls into ProcessLambdaExpression, which calls into ExpandNavigationsForSource which visits the the Where predicate. This causes the Where lambda to be fully processed by the visitor, and the AsQueryable wrapping
__strings_0
is removed.However, ProcessContains does not similarly recurse into the item argument of Contains; so the AsQueryable there isn't removed.
Note that there may be other important functionality of nav expansion which is not performed here; and there are other operator aside from Contains which likely don't visit their non-lambda arguments. So there are probably other bugs hiding in here.
When this is fixed, we can remove the unwrapping of AsQueryable() from the fallback Contains translation (see #32218).
The text was updated successfully, but these errors were encountered: