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
Declared-nullability check: each emitted SQL function's declaration against PostgreSQL and the complete translated expression (#360's static half) #380
#349 (lower/upper) and #360 (array_cat) were declarations that told EF Core a function is NULL exactly when an argument is, where PostgreSQL said otherwise. #362 describes the static half that catches that class: list what the translators emit and check each declaration. Checking pg_proc.proisstrict alone is not enough, because what EF Core reasons about is the whole translated expression: UpperBound() on a discrete range is upper(x) - 1, the factories are a CASE around a non-strict constructor, and a predicate is wrapped in x IS NOT NULL AND ….
Change
A test, DeclaredNullabilityTests (integration project), that translates every discovered range, RangeSet and value set member over a nullable column and a required one, walks the SQL tree EF Core hands the provider, and for each SqlFunctionExpression it finds compares the declared IsNullable and ArgumentsPropagateNullability with pg_proc.proisstrict for that function and argument types. It then evaluates the complete translated expression on the server for NULL and non-NULL inputs and checks that it is NULL exactly when EF Core's declaration says it can be. Disagreements go through Candidates.Verdict.
Done when
Registered in test/oracles/oracles.json and shown to catch bound-declared-null-only-for-a-null-argument.patch; #360's array_cat is reported under #360.
Activity
Merge pull request #383 from CaffeinatedCoder/test/362-composition-sw…