Note
This matrix is maintenance evidence for LINQ translator coverage. For the shorter user-facing contract, start with Supported LINQ Queries.
LINQ Translation Support Matrix
Status: Current test-backed LINQ translator baseline; update whenever LINQ translator support changes.
This matrix records what the active compliance tests prove today, where the public support docs are accurate, and which gaps remain outside the documented support boundary.
The evidence column intentionally points at test files instead of implementation files. If a shape is not represented in active tests, treat it as unsupported or at least undocumented until a focused regression test proves otherwise.
Predicate Translation
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
| Scalar equality and inequality | ==, !=, reversed constant/member equality, missing-row filters, chained Where(a).Where(b) |
src/DataLinq.Tests.Compliance/Query/EmployeesQueryBehaviorTests.cs |
Chained Where(a).Where(b) is now separately covered across collection, scalar, single-row, and paging result shapes. |
| Range comparison | >, >=, <, <= against constants and selected member expressions |
EmployeesQueryBehaviorTests.cs, Translation/EmployeesDateTimeMemberTests.cs |
Public docs match this. |
| Enum comparison | enum equality, inequality, negated enum equality | EmployeesQueryBehaviorTests.cs |
Public docs match this. |
| Property-to-property comparison | equality, inequality, greater-than, less-than-or-equal comparisons between translated operands | EmployeesQueryBehaviorTests.cs |
Public docs mention this, but the coverage is narrow and should not be generalized to arbitrary expressions. |
| Boolean grouping | &&, ||, !, nested grouped predicates, De Morgan-style groups |
Translation/EmployeesBooleanLogicTests.cs, EmployeesQueryBehaviorTests.cs |
Public docs match this at a high level. Fixed true/false conditions now have dedicated regression coverage. |
| Nullable boolean predicates | nullable bool compared to true, false, and null; negated equality forms |
Translation/EmployeesNullableBooleanTests.cs |
Public docs match this. |
| Nullable value predicates | .HasValue, !HasValue, guarded .Value comparisons, selected guarded date/time member access, and mixed nullable/non-nullable equality and inequality |
Translation/EmployeesNullablePredicateTests.cs, Translation/EmployeesDateTimeMemberTests.cs |
The support boundary is intentionally documented. nullable != nonNullable includes null rows to match C# lifted nullable semantics. |
| Character predicates | LINQ char predicate matches raw SQL parameter behavior | Translation/CharPredicateTranslationTests.cs, Query/SQLiteInMemoryBehaviorTests.cs |
Public docs did not call this out; it is a narrow parameter/type-fidelity case. |
Relation Predicate Translation
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
| One-to-many relation existence | generated collection relation Any(), Any(predicate), negated Any(predicate), and existence-equivalent Count() comparisons |
Translation/EmployeesRelationPredicateTranslationTests.cs |
These translate to correlated EXISTS subqueries. Count() support is deliberately limited to forms reducible to existence or non-existence. |
| Related-row predicate body | direct related-row member comparisons against local values, plus simple && and || groups |
Translation/EmployeesRelationPredicateTranslationTests.cs |
This is not arbitrary predicate translation for a second query source. Relation traversal from the related row remains rejected. |
| Unsupported relation predicate shapes | relation traversal inside the related-row predicate and unsupported Count() thresholds fail with QueryTranslationException |
Translation/EmployeesRelationPredicateTranslationTests.cs |
Many-to-one relation predicates, relation projections, and relation aggregates beyond existence-equivalent Count() forms remain outside the documented boundary. |
Local Collections and Fixed Conditions
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
Contains over local arrays |
ids.Contains(row.Column) and negated form translate as membership predicates |
EmployeesQueryBehaviorTests.cs, Translation/EmployeesContainsTranslationTests.cs |
Public docs match this. |
Contains over List<T> and HashSet<T> |
list/set membership over local values | EmployeesQueryBehaviorTests.cs, Translation/EmployeesEmptyListQueryTests.cs |
Public docs match this. |
Contains over ReadOnlySpan<T> |
span-backed membership over local arrays | Translation/EmployeesContainsTranslationTests.cs |
Public docs understated this. Keep the claim narrow: this proves the tested span shape, not arbitrary span pipelines. |
| Multiple collection predicates | combined local collection membership with &&, additional string predicates, and range predicates |
EmployeesQueryBehaviorTests.cs |
Useful coverage for local-sequence regression safety. |
Empty local Contains |
false fixed condition, negated true condition, direct composition, nested AND/OR, negated groups, and unsupported item expressions skipped when the empty list already determines the result |
Translation/EmployeesContainsTranslationTests.cs, Translation/EmployeesEmptyListQueryTests.cs, Translation/EmployeesBooleanLogicTests.cs |
The fixed-condition truth table and grouping behavior are covered by focused tests. |
Constant-item Contains |
constant true and constant false predicates collapse to fixed conditions | Translation/EmployeesContainsTranslationTests.cs |
Public docs did not call this out. This is implementation behavior worth preserving. |
Empty local Any(predicate) |
false fixed condition, negated true condition, direct composition, nested AND/OR, negated groups; complex or otherwise unsupported predicate bodies are ignored when the sequence is empty |
Translation/EmployeesEmptyListQueryTests.cs, Translation/EmployeesBooleanLogicTests.cs |
Public docs distinguish empty fixed-condition behavior from non-empty equality membership. |
Projected local Contains |
localObjects.Select(x => x.Value).Contains(row.NullableColumn.Value) and empty projected local sequences |
Translation/EmployeesContainsTranslationTests.cs |
Guarded local sequence extraction is tested for safe local projections that do not reference the database query source. |
Local object-list Any(predicate) |
scalar item equality, object-member equality, reversed equality, nullable wrapper normalization, and negated NOT IN membership |
Translation/EmployeesEmptyListQueryTests.cs, Translation/EmployeesLocalAnyPredicateTests.cs |
Equality-membership shapes are covered. Compound non-empty local predicates remain unsupported. |
Fixed-Condition Truth Table
These shapes intentionally collapse to fixed SQL predicates instead of generating invalid SQL or visiting predicate bodies that do not matter.
| Query shape | Fixed condition | SQL predicate | Evidence |
|---|---|---|---|
empty.Contains(value) |
false | 1=0 |
Translation/EmployeesContainsTranslationTests.cs, Translation/EmployeesEmptyListQueryTests.cs |
!empty.Contains(value) |
true | 1=1 |
Translation/EmployeesContainsTranslationTests.cs, Translation/EmployeesEmptyListQueryTests.cs |
empty.Any() |
false | 1=0 |
Translation/EmployeesEmptyListQueryTests.cs |
!empty.Any() |
true | 1=1 |
Translation/EmployeesEmptyListQueryTests.cs |
empty.Any(predicate) |
false without visiting predicate |
1=0 |
Translation/EmployeesEmptyListQueryTests.cs, Translation/EmployeesBooleanLogicTests.cs |
!empty.Any(predicate) |
true without visiting predicate |
1=1 |
Translation/EmployeesEmptyListQueryTests.cs, Translation/EmployeesBooleanLogicTests.cs |
constant local.Contains(item) when the item is present |
true | 1=1 |
Translation/EmployeesContainsTranslationTests.cs |
constant local.Contains(item) when the item is absent |
false | 1=0 |
Translation/EmployeesContainsTranslationTests.cs |
Member and Method Translation
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
| String prefix/suffix search | StartsWith, EndsWith, negated prefix/suffix predicates |
EmployeesQueryBehaviorTests.cs |
Public docs match this. |
| String content search | string Contains |
Translation/EmployeesStringMemberTests.cs |
Public docs match this. |
| String casing | ToUpper, ToLower |
Translation/EmployeesStringMemberTests.cs |
Public docs match this. |
| String trimming and length | Trim, Length, Trim().Length |
Translation/EmployeesStringMemberTests.cs |
Public docs match this. |
| String substring | Substring(...) in tested argument shapes |
Translation/EmployeesStringMemberTests.cs |
Public docs should stay conservative on overload breadth. |
| String null/whitespace checks | string.IsNullOrEmpty, string.IsNullOrWhiteSpace in true and false forms |
Translation/EmployeesStringMemberTests.cs |
Public docs match this. |
| DateOnly members | Year, Month, Day, DayOfYear, DayOfWeek |
Translation/EmployeesDateTimeMemberTests.cs |
Public docs match this. |
| TimeOnly members | Hour behind nullable guard |
Translation/EmployeesDateTimeMemberTests.cs |
Public docs match this at member level. |
| DateTime members | Minute, Second, Millisecond behind nullable guard |
Translation/EmployeesDateTimeMemberTests.cs |
Public docs match this at member level. |
| Provider-specific function semantics | SQLite, MySQL, and MariaDB behavior is exercised through active provider data sources | all active-provider compliance tests | The matrix should not promise identical SQL text across providers. It only promises equivalent behavior for the tested rows. |
Result Operators
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
| Materialization and counts | ToList(), Count(), Count(predicate) |
EmployeesQueryBehaviorTests.cs, Translation/EmployeesDateTimeMemberTests.cs |
Public docs list Count() but should distinguish predicate count coverage. |
| Existence | Any(), Any(predicate), and Where(...).Any() |
EmployeesQueryBehaviorTests.cs |
Public docs list Any() but should distinguish predicate coverage from local Enumerable.Any(predicate) translation. |
| Single-row operators | Single(predicate), SingleOrDefault(predicate), First(predicate), FirstOrDefault(predicate) |
EmployeesQueryBehaviorTests.cs, Translation/EmployeesStringMemberTests.cs |
Public docs match this. |
| Last-row operators | Last(), LastOrDefault(predicate) in ordered scenarios |
EmployeesQueryBehaviorTests.cs |
Public docs match this but should keep the existing advice to order explicitly. |
| Unsupported tail/while operators | TakeLast, SkipLast, TakeWhile, SkipWhile throw NotSupportedException |
EmployeesQueryBehaviorTests.cs |
Public docs match this. |
| Scalar aggregates | Sum, Min, Max, Average over direct numeric members, nullable numeric members, nullable .Value, and filtered sequences |
Translation/EmployeesAggregateTranslationTests.cs |
The boundary is narrow: no computed selector aggregates, grouped aggregates, or relation-property aggregates. |
Ordering, Paging, and Projection
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
| Ordering | OrderBy, OrderByDescending, ThenBy, ThenByDescending, mixed ascending/descending ordering |
EmployeesQueryBehaviorTests.cs |
Public docs match this. |
| Paging | Skip, Take, Skip(...).Take(...) with ordered queries and composed chained predicates |
EmployeesQueryBehaviorTests.cs |
Chained-filter paging has focused regression coverage. |
| Ordering plus filtering | Where(...).OrderBy(...), OrderBy(...).Where(...), and Where(...).OrderBy(...).Where(...) |
EmployeesQueryBehaviorTests.cs |
Focused regression coverage proves the outer predicate is preserved after an inner ordering clause. |
| Full-model projection | selecting the model entity | EmployeesQueryBehaviorTests.cs |
Public docs match this. |
| Scalar projection | Select(x => x.Property) |
EmployeesQueryBehaviorTests.cs, translation tests |
Public docs match this. |
| Anonymous projection | Select(x => new { ... }) for simple property members and row-local computed expressions |
EmployeesQueryBehaviorTests.cs, Translation/EmployeesProjectionTranslationTests.cs |
These are post-materialization projections, not SQL-backed SELECT-list expressions. Relation-property projections remain rejected to avoid hidden N+1 behavior. |
| Computed scalar projection | row-local string concatenation and materialized member chains after SQL filtering, ordering, and paging | Translation/EmployeesProjectionTranslationTests.cs |
Client projection is deliberate here. Do not generalize this to SQL predicate method translation. |
| Views and primary-key lookup | querying generated views and direct Get<T>(key) lookup |
SeededEmployeesQueryTests.cs, EmployeesQueryBehaviorTests.cs |
Direct lookup is not a LINQ predicate but belongs in the surrounding query support docs. |
Explicit Joins
| Area | Currently tested support | Evidence | Audit notes |
|---|---|---|---|
Inner Join(...) |
one explicit inner join between two direct DataLinq query sources, direct member equality keys, nullable .Value key normalization, and row-local result projection from both sides |
Translation/EmployeesJoinTranslationTests.cs |
This is deliberately narrow. SQL selects primary keys from both sides, then DataLinq materializes rows and applies the result selector client-side. |
| Unsupported join shapes | composite anonymous-object keys, GroupJoin(...), filtering over the joined result, and relation-property result projection fail with QueryTranslationException |
Translation/EmployeesJoinTranslationTests.cs |
Outer joins, additional ordering/paging/result operators over joined results, relation-property joins, and multi-join pipelines are outside the documented boundary. |
Unsupported or Not Yet Proven
These shapes are intentionally not part of the documented support boundary today:
GroupBy(...)GroupJoin(...), outer joins, composite-key joins, multi-join pipelines, and additional filtering/ordering/paging over explicit joined results- relation-property query expansion beyond the documented one-to-many
Any(...)and existence-equivalentCount()predicates - aggregate result operators over computed selectors, grouped aggregates, or relation properties
- arbitrary local
Enumerablemethod chains inside predicates - arbitrary client methods inside SQL predicates
- nested database subqueries
- relation-property projections inside provider
Select(...) - nested database subqueries inside provider
Select(...)
Unsupported predicate methods, non-empty compound local Any(predicate) shapes, unsupported selectors, and unsupported scalar result operators now have focused QueryTranslationException coverage in Translation/EmployeesUnsupportedQueryDiagnosticsTests.cs.
Regression Coverage Notes
The regression suite includes tests that make dropped predicates hard to miss:
Where(a).Where(b)where each predicate excludes different seeded rows and the combined result is strictly smaller than either single predicate.Where(a).OrderBy(...).Where(b)if Remotion emits a nested query shape the current parser accepts.Where(a).Where(b).Count(),.Any(),.First(), and.SingleOrDefault()to prove result operators apply after both predicates.Where(a).Where(b).Skip(...).Take(...)over a deterministic ordering to prove paging is applied after the composed filter.
The highest-value remaining test aid is generated-SQL inspection for these composition cases. Row assertions are mandatory, but SQL shape assertions would expose a dropped outer predicate immediately instead of relying on seed-data luck.