Some tool generated queries do weird things like:
COALESCE(l.x, r.y) from l left join r on l.x = r.y
which is simply l.x. By using coalesce, the plan gets messed up sometimes especially bucketed joins. So we should optimize this.
CC: @feilong-liu @maniloya