Expand description

Push non-null requirements toward sources.

This analysis derives NonNull requirements on the arguments to predicates. These requirements exist because most functions with Null arguments are themselves Null, and a predicate that evaluates to Null will not pass.

These requirements are not here introduced as constraints, but rather flow to sources of data and restrict any constant collections to those rows that satisfy the constraint. The main consequence is when Null values are added in support of outer-joins and subqueries, we can occasionally remove that branch when we observe that Null values would be subjected to predicates.

This analysis relies on a careful understanding of ScalarExpr and the semantics of various functions, some of which may be non-Null even with Null arguments.


Push non-null requirements toward sources.