Repository navigation
Commit 1c5cd69
authored
Translate List<T>.Exists to Queryable.Any (#38226)
Rewrites List<T>.Exists(predicate) to AsQueryable().Any(predicate) in
QueryableMethodNormalizingExpressionVisitor, mirroring the existing
ICollection<T>.Contains conversion. The Predicate<T> lambda is rebuilt
as Func<T, bool> so the resulting Queryable.Any call type-checks.
Flips four placeholder tests (Where_Join_Exists, _Inequality, _Constant,
Where_Join_Not_Exists) from AssertTranslationFailed to AssertQuery, and
populates the SqlServer SQL baselines with the EXISTS subquery output.
Fixes #177621 parent e4afabf commit 1c5cd69
4 files changed
Lines changed: 84 additions & 20 deletions
File tree
- src/EFCore/Query/Internal
- test
- EFCore.Cosmos.FunctionalTests/Query
- EFCore.Specification.Tests/Query
- EFCore.SqlServer.FunctionalTests/Query
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
| |||
506 | 513 | | |
507 | 514 | | |
508 | 515 | | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
509 | 545 | | |
510 | 546 | | |
511 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
| 1097 | + | |
| 1098 | + | |
1098 | 1099 | | |
1099 | 1100 | | |
1100 | 1101 | | |
1101 | 1102 | | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | | - | |
| 1105 | + | |
| 1106 | + | |
1105 | 1107 | | |
1106 | 1108 | | |
1107 | 1109 | | |
1108 | 1110 | | |
1109 | 1111 | | |
1110 | 1112 | | |
1111 | | - | |
| 1113 | + | |
| 1114 | + | |
1112 | 1115 | | |
1113 | 1116 | | |
1114 | 1117 | | |
1115 | 1118 | | |
1116 | 1119 | | |
1117 | 1120 | | |
1118 | | - | |
| 1121 | + | |
| 1122 | + | |
1119 | 1123 | | |
1120 | 1124 | | |
1121 | 1125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1942 | 1942 | | |
1943 | 1943 | | |
1944 | 1944 | | |
1945 | | - | |
1946 | | - | |
| 1945 | + | |
1947 | 1946 | | |
1948 | 1947 | | |
1949 | | - | |
| 1948 | + | |
| 1949 | + | |
1950 | 1950 | | |
1951 | 1951 | | |
1952 | 1952 | | |
1953 | | - | |
1954 | | - | |
| 1953 | + | |
1955 | 1954 | | |
1956 | 1955 | | |
1957 | | - | |
| 1956 | + | |
1958 | 1957 | | |
1959 | 1958 | | |
1960 | 1959 | | |
1961 | | - | |
1962 | | - | |
| 1960 | + | |
1963 | 1961 | | |
1964 | | - | |
| 1962 | + | |
| 1963 | + | |
1965 | 1964 | | |
1966 | 1965 | | |
1967 | 1966 | | |
1968 | | - | |
1969 | | - | |
| 1967 | + | |
1970 | 1968 | | |
1971 | | - | |
| 1969 | + | |
1972 | 1970 | | |
1973 | 1971 | | |
1974 | 1972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1964 | 1964 | | |
1965 | 1965 | | |
1966 | 1966 | | |
1967 | | - | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
| 1975 | + | |
1968 | 1976 | | |
1969 | 1977 | | |
1970 | 1978 | | |
1971 | 1979 | | |
1972 | 1980 | | |
1973 | 1981 | | |
1974 | | - | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
1975 | 1991 | | |
1976 | 1992 | | |
1977 | 1993 | | |
1978 | 1994 | | |
1979 | 1995 | | |
1980 | 1996 | | |
1981 | | - | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
1982 | 2003 | | |
1983 | 2004 | | |
1984 | 2005 | | |
1985 | 2006 | | |
1986 | 2007 | | |
1987 | 2008 | | |
1988 | | - | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
1989 | 2015 | | |
1990 | 2016 | | |
1991 | 2017 | | |
| |||
0 commit comments