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
sqlfmt doesn't seem to understand that the any function is an aggregate function and not the typical SQL ANY operator. See examples below.
To Reproduce
File example1.sql:
select any(number) as any_number from (selectnumberfromsystem.numberslimit10)
Also, file example2.sql:
selectmax(number) as max_number, min(number) as min_number, any(number) as any_number, avg(number) as avg_number from (selectnumberfromsystem.numberslimit10)
Expected behavior
For example1.sql:
select any(number) as any_number from (selectnumberfromsystem.numberslimit10)
(no change)
For example2.sql:
selectmax(number) as max_number,
min(number) as min_number,
any(number) as any_number,
avg(number) as avg_number
from (selectnumberfromsystem.numberslimit10)
Actual behavior
After running sqlfmt example1.sql --dialect clickhouse --line-length 88:
select any (number) as any_number from (selectnumberfromsystem.numberslimit10)
Extra whitespace is added incorrectly.
After running sqlfmt example2.sql --dialect clickhouse --line-length 88:
selectmax(number) as max_number,
min(number) as min_number, any (number) as any_number,
avg(number) as avg_number
from (selectnumberfromsystem.numberslimit10)
Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.19.2
The text was updated successfully, but these errors were encountered:
Describe the bug
sqlfmt doesn't seem to understand that the
any
function is an aggregate function and not the typical SQL ANY operator. See examples below.To Reproduce
File
example1.sql
:Also, file
example2.sql
:Expected behavior
For
example1.sql
:(no change)
For
example2.sql
:Actual behavior
After running
sqlfmt example1.sql --dialect clickhouse --line-length 88
:Extra whitespace is added incorrectly.
After running
sqlfmt example2.sql --dialect clickhouse --line-length 88
:Additional context
What is the output of
sqlfmt --version
?sqlfmt, version 0.19.2
The text was updated successfully, but these errors were encountered: