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
QueryableMethodNormalizingExpressionVisitor does not visit recursively when converting List.Contains to Queryable.Contains #32215
[ConditionalTheory]// #32208[MemberData(nameof(IsAsyncData))]publicvirtualTaskNested_contains_with_Lists_and_no_inferred_type_mapping(boolasync){varints=newList<int>{1,2,3};varstrings=newList<string>{"one","two","three"};// Note that in this query, the outer Contains really has no type mapping, neither for its source (collection parameter), nor// for its item (the conditional expression returns constants). The default type mapping must be applied.returnAssertQuery(async,ss=>ss.Set<PrimitiveCollectionsEntity>().Where(e =>strings.Contains(ints.Contains(e.Int)?"one":"two")));}
SQL:
SELECT [p].[Id], [p].[Bool], [p].[Bools], [p].[DateTime], [p].[DateTimes], [p].[Enum], [p].[Enums], [p].[Int], [p].[Ints], [p].[NullableInt], [p].[NullableInts], [p].[NullableString], [p].[NullableStrings], [p].[String], [p].[Strings]
FROM [PrimitiveCollectionsEntity] AS [p]
WHERE CASE
WHEN [p].[Int] IN (1, 2, 3) THEN N'one'
ELSE N'two'
END IN (
SELECT [s].[value]
FROM OPENJSON(@__strings_0) WITH ([value] nvarchar(max) '$') AS [s]
)
changed the title [-]Array parameter isn't translated as a primitive collection in some cases[/-][+]QueryableMethodNormalizingExpressionVisitor does not visit recursively when converting List.Contains to Queryable.Contains[/+]on Nov 2, 2023
Activity
[-]Array parameter isn't translated as a primitive collection in some cases[/-][+]QueryableMethodNormalizingExpressionVisitor does not visit recursively when converting List.Contains to Queryable.Contains[/+]Visit arguments in QueryableMethodNormalizingExpressionVisitor after …
Visit arguments in QueryableMethodNormalizingExpressionVisitor after …
Visit arguments in QueryableMethodNormalizingExpressionVisitor after …
roji commentedon Nov 3, 2023
Reopening to discuss patching 8.0
Visit arguments in QueryableMethodNormalizingExpressionVisitor after …
Visit arguments in QueryableMethodNormalizingExpressionVisitor after …
Visit arguments in QueryableMethodNormalizingExpressionVisitor after …