LogicalOptimizer rewriting left/right outer join to inner join where appropriate