FULL OUTER JOIN not wrapping correctly
a.higgins
Posts: 90 Bronze 2
When I use a FULL OUTER JOIN in my code, it appears not to correctly associated the "FULL" keyword with the rest of the JOIN. The problem doesn't seem to apply to any of the other JOIN types.
Starting code:
After formatting:
Notice that the LEFT and RIGHT keywords are on the same line as the OUTER JOIN syntax, but the FULL keyword is left hanging out on the line above, and the ON is weirdly indented.
Expected result after formatting:
This would make the formatting of FULL OUTER JOIN consistent with the rest.
Starting code:
;WITH a AS (SELECT 1 AS x) SELECT * FROM a FULL OUTER JOIN a a2 ON a.x = a2.x LEFT OUTER JOIN a a3 ON a.x = a3.x RIGHT OUTER JOIN a a4 ON a.x = a4.x
After formatting:
;WITH a AS ( SELECT 1 AS x ) SELECT a.x ,a2.x ,a3.x ,a4.x FROM a FULL OUTER JOIN a a2 ON a.x = a2.x LEFT OUTER JOIN a a3 ON a.x = a3.x RIGHT OUTER JOIN a a4 ON a.x = a4.x
Notice that the LEFT and RIGHT keywords are on the same line as the OUTER JOIN syntax, but the FULL keyword is left hanging out on the line above, and the ON is weirdly indented.
Expected result after formatting:
;WITH a AS ( SELECT 1 AS x ) SELECT a.x ,a2.x ,a3.x ,a4.x FROM a FULL OUTER JOIN a a2 ON a.x = a2.x LEFT OUTER JOIN a a3 ON a.x = a3.x RIGHT OUTER JOIN a a4 ON a.x = a4.x
This would make the formatting of FULL OUTER JOIN consistent with the rest.
Comments
We have fixed this privately and will have it out in the next release.
Thanks for sending through these reports!
Best regards,
David
The new beta build has been released and should have a fix for this if you'd like to give it a try.
Thanks again for reporting these issues!