When I wrote the bulk of the validation code, I was properly confused about nullable booleans in the context of predicate expressions (both things that want one, and things that return one, like set containment subqueries). There is a good summary about what the behavior of these things should be here, but it's probably worth double-checking corner cases against query engine documentation or just by experimentation. When a nullable boolean is received by a predicate expression slot, the validator should probably also emit a note of some kind about what null means in that particular context.
Todo list (to check):
- Predicate expression slots:
- Things that return predicates:
- Expression.SingularOrList -> return non-nullable currently?
- Expression.MultiOrList -> return non-nullable currently?
- Expression.Subquery.InPredicate -> return non-nullable currently?
- Expression.Subquery.SetPredicate -> return non-nullable currently?
- Expression.Subquery.SetComparison -> return non-nullable currently?
When I wrote the bulk of the validation code, I was properly confused about nullable booleans in the context of predicate expressions (both things that want one, and things that return one, like set containment subqueries). There is a good summary about what the behavior of these things should be here, but it's probably worth double-checking corner cases against query engine documentation or just by experimentation. When a nullable boolean is received by a predicate expression slot, the validator should probably also emit a note of some kind about what null means in that particular context.
Todo list (to check):