Skip to content

v2.0-alpha.20171218-plus-left-join-fix

@RaduBerinde RaduBerinde tagged this 19 Dec 22:18
Issue #20765 points out an interesting case:
  `SELECT * FROM l LEFT JOIN r USING(a) WHERE a=3`

In this case, `WHERE a=3` is internally `WHERE l.a=3`. We can push
down a corresponding constraint `r.a=3` because only those rows can
contribute to any final results.

In general, for LEFT JOINs we remap any constraints on left-side
equality columns and push them down to the right side. The case for
RIGHT JOINs is symmetric.

Fixes #20765.
Assets 2
Loading