For 17.4, the formatter will attempt to format invalid SQL for you.
If the parser runs into a problem recognizing your code, it will format it as much as it can. But that’s not all.
It will ALSO go to the end of your statement, and traverse the SQL in the other direction and continue formatting as far as it can.
Let’s look at an example:
But hey, let’s format it anyway.
Cause hey, we’re trying to fix the code, but it’s so hard to read. We could really use the formatter’s help.
Adds the missing pipe |, formats again.
When does 17.4 come out?
Soon’ish. But the name should give you a pretty good hint.