-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Description
Describe the bug
Currently whitespace around CTEs is preserved sometimes, which for me again isn't desired, but I understand if this is intended and not something you want to change
To Reproduce
with
line_items as (
select * from {{ ref("order_line_items__01_with_financials") }}
),
gift_cards as (
select * from {{ ref("gift_cards") }}
),
select *
from line_items
union all
select *
from gift_cards
Expected behavior
ie. when new lines exist around CTEs / other things (see the space before union all) then I expect it to be reduced to a single new line. (I personally would even go further and add those single new lines even if they weren't in the input, but I do understand that's probably a minority opinion)
with
line_items as (
select * from {{ ref("order_line_items__01_with_financials") }}
),
gift_cards as (select * from {{ ref("gift_cards") }}),
select *
from line_items
union all
select *
from gift_cards
Actual behavior
with
line_items as (
select * from {{ ref("order_line_items__01_with_financials") }}
),
gift_cards as (select * from {{ ref("gift_cards") }}),
select *
from line_items
union all
select *
from gift_cards
Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.10.0
Metadata
Metadata
Assignees
Labels
No labels