You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have a bug with nested brackets [] and () in a sql statement like this:
select*,
array[
(
my_key ||'_'|| (blob #>> '{key,value}'),
)
] as new_blob
from my_table
Because I have newline after teh array[ and parenthesis around the (blob #>> '{key,value}'), this one fails to format the file with the following error:
sqlfmt encountered an error: Closing bracket ']' found at 164 does not match last opened bracket '(' found at 77.
Describe the bug
I have a bug with nested brackets
[]
and()
in a sql statement like this:Because I have newline after teh
array[
and parenthesis around the(blob #>> '{key,value}')
, this one fails to format the file with the following error:If you write the sql statement as such:
It actually formats the query but it looks very weird, output:
To Reproduce
See above for code to use.
Expected behavior
I expect that the formatting should work with nested brackets.
Actual behavior
See actual behavor above.
Additional context
v0.24.0
The text was updated successfully, but these errors were encountered: