opt: simplify outer joins in more cases #83962
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-sql-queries
SQL Queries Team
Describe the problem
Currently, we don't fire null-rejection rules when the query has outer columns. This is to avoid cases where
IS NOT NULL
filter pushdown rules conflict with decorrelation rules that attempt to pull the filters back up the tree (see #35171).To Reproduce
The left join in #80901 could not be simplified for the above reason.
Expected behavior
One possibility is to change the way null-rejection rules work; instead of creating an
IS NOT NULL
filter and relying on filter pushdown rules to ensure it reaches the operator that requested null-rejection, we could traverse the query tree wherever it would be possible to push down anIS NOT NULL
filter and simplify outer joins as we go. This would prevent conflicts with decorrelation rules because the simplification would take place 'all at once', without invoking normalization during the traversal.Jira issue: CRDB-17371
The text was updated successfully, but these errors were encountered: