SNOW-3485482: Eliminate unnecessary SELECT * from joins (#4248)